Easy patches: synch 2.4.x and trunk
- core: Re-introduce check for sufficient PCRE version.
- core: Fix doc string for QualifyRedirectURL
- mod_proxy: really return an error message on invalid "flusher" value.
- mod_http2: Remove extra and un-needed ""
- mod_ldap: fix a (unlikely) memory leak
- ab: fix a typo
- suexec: Report error string after failure from setgid/initgroups or setuid
- mod_session_crypto: be less specific and don't echo passphrase
- mod_proxy_html: Fix proxy_html_conf.bufsz to have correct type, as
it is used with ap_set_int_slot.
- mod_md: update duplicated APLOGNOs.
Submitted by: fuankg, trawick, ylavic, jailletc36, jorton, jailletc36, jorton, covener, jorton, ylavic
Reviewed by: jailletc36, jim, ylavic
Backported by: jailletc36
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@
1879490 13f79535-47bb-0310-9956-
ffa450edef68
const char *doctype;
const char *etag;
unsigned int flags;
- size_t bufsz;
+ int bufsz;
apr_hash_t *links;
apr_array_header_t *events;
const char *charset_out;
rv = nghttp2_session_change_stream_priority(session->ngh2, stream->id, &ps);
ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c,
- ""H2_STRM_LOG(APLOGNO(03203), stream,
+ H2_STRM_LOG(APLOGNO(03203), stream,
"PUSH %s, weight=%d, depends=%d, returned=%d"),
ptype, ps.weight, ps.stream_id, rv);
status = (rv < 0)? APR_EGENERAL : APR_SUCCESS;
*/
util_url_node_t *util_ald_create_caches(util_ldap_state_t *st, const char *url)
{
- util_url_node_t curl, *newcurl = NULL;
+ util_url_node_t curl;
util_ald_cache_t *search_cache;
util_ald_cache_t *compare_cache;
util_ald_cache_t *dn_compare_cache;
/* check that all the caches initialised successfully */
if (search_cache && compare_cache && dn_compare_cache) {
-
/* The contents of this structure will be duplicated in shared
memory during the insert. So use stack memory rather than
pool memory to avoid a memory leak. */
curl.compare_cache = compare_cache;
curl.dn_compare_cache = dn_compare_cache;
- newcurl = util_ald_cache_insert(st->util_ldap_cache, &curl);
-
+ return util_ald_cache_insert(st->util_ldap_cache, &curl);
}
+ else {
+ /* util_ald_destroy_cache is a noop for a NULL argument. */
+ util_ald_destroy_cache(search_cache);
+ util_ald_destroy_cache(compare_cache);
+ util_ald_destroy_cache(dn_compare_cache);
- return newcurl;
+ return NULL;
+ }
}
uri = md_util_schemify(p, s->server_admin, "mailto");
if (md_array_str_index(md->contacts, uri, 0, 0) < 0) {
APR_ARRAY_PUSH(md->contacts, const char *) = uri;
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, base_server, APLOGNO(10044)
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, base_server, APLOGNO(10237)
"%s: added contact %s", md->name, uri);
}
}
}
else if (sc->assigned->nelts != 1) {
if (!fallback) {
- ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, APLOGNO(10042)
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, APLOGNO(10238)
"conflict: %d MDs match Virtualhost %s which uses SSL, however "
"there can be at most 1.",
(int)sc->assigned->nelts, s->server_hostname);
worker->s->conn_timeout_set = 1;
}
else if (!strcasecmp(key, "flusher")) {
- if (strlen(val) >= sizeof(worker->s->flusher))
- apr_psprintf(p, "flusher name length must be < %d characters",
- (int)sizeof(worker->s->flusher));
- PROXY_STRNCPY(worker->s->flusher, val);
+ if (PROXY_STRNCPY(worker->s->flusher, val) != APR_SUCCESS) {
+ return apr_psprintf(p, "flusher name length must be < %d characters",
+ (int)sizeof(worker->s->flusher));
+ }
}
else if (!strcasecmp(key, "upgrade")) {
if (PROXY_STRNCPY(worker->s->upgrade, val) != APR_SUCCESS) {
*cipher, APR_MODE_CBC, 1, 4096, f, r->pool);
if (APR_STATUS_IS_ENOKEY(res)) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, res, r, APLOGNO(01825)
- "the passphrase '%s' was empty", passphrase);
+ "failure generating key from passphrase");
}
if (APR_STATUS_IS_EPADDING(res)) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, res, r, APLOGNO(01826)
f, r->pool);
if (APR_STATUS_IS_ENOKEY(res)) {
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, res, r, APLOGNO(01832)
- "the passphrase '%s' was empty", passphrase);
+ "failure generating key from passphrase");
continue;
}
else if (APR_STATUS_IS_EPADDING(res)) {
AP_INIT_TAKE2("CGIVar", set_cgi_var, NULL, OR_FILEINFO,
"Controls how some CGI variables are set"),
AP_INIT_FLAG("QualifyRedirectURL", set_qualify_redirect_url, NULL, OR_FILEINFO,
- "Controls whether HTTP authorization headers, normally hidden, will "
- "be passed to scripts"),
+ "Controls whether the REDIRECT_URL environment variable is fully "
+ "qualified"),
AP_INIT_TAKE1("ForceType", ap_set_string_slot_lower,
(void *)APR_OFFSETOF(core_dir_config, mime_type), OR_FILEINFO,
#include "apr_tables.h"
#include "pcre.h"
+/* PCRE_DUPNAMES is only present since version 6.7 of PCRE */
+#ifndef PCRE_DUPNAMES
+#error PCRE Version 6.7 or later required!
+#else
+
#define APR_WANT_STRFUNC
#include "apr_want.h"
return namecount;
}
+#endif /* PCRE_DUPNAMES defined */
+
/* End of pcreposix.c */
** This program is based on ZeusBench V1.0 written by Adam Twiss
** which is Copyright (c) 1996 by Zeus Technology Ltd. http://www.zeustech.net/
**
- ** This software is provided "as is" and any express or implied waranties,
+ ** This software is provided "as is" and any express or implied warranties,
** including but not limited to, the implied warranties of merchantability and
** fitness for a particular purpose are disclaimed. In no event shall
** Zeus Technology Ltd. be liable for any direct, indirect, incidental, special,
* and setgid() to the target group. If unsuccessful, error out.
*/
if (((setgid(gid)) != 0) || (initgroups(actual_uname, gid) != 0)) {
- log_err("failed to setgid (%lu: %s)\n", (unsigned long)gid, cmd);
+ log_err("failed to setgid/initgroups (%lu: %s): %s\n",
+ (unsigned long)gid, cmd, strerror(errno));
exit(109);
}
* setuid() to the target user. Error out on fail.
*/
if ((setuid(uid)) != 0) {
- log_err("failed to setuid (%lu: %s)\n", (unsigned long)uid, cmd);
+ log_err("failed to setuid (%lu: %s): %s\n",
+ (unsigned long)uid, cmd, strerror(errno));
exit(110);
}