|| ((strpbrk("@", sent_pw) != NULL)
&& (strpbrk(".", sent_pw) != NULL)))) {
if (sec->auth_anon_logemail && ap_is_initial_req(r)) {
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, APR_SUCCESS, r,
"Anonymous: Passwd <%s> Accepted",
sent_pw ? sent_pw : "\'none\'");
}
}
else {
if (sec->auth_anon_authoritative) {
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, APR_SUCCESS, r,
"Anonymous: Authoritative, Passwd <%s> not accepted",
sent_pw ? sent_pw : "\'none\'");
return AUTH_REQUIRED;
#else
if (!(f = dbopen(auth_dbpwfile, O_RDONLY, 0664, DB_HASH, NULL))) {
#endif
- ap_log_rerror(APLOG_MARK, APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, errno, r,
"could not open db auth file: %s", auth_dbpwfile);
return NULL;
}
if (!(real_pw = get_db_pw(r, r->user, sec->auth_dbpwfile))) {
if (!(sec->auth_dbauthoritative))
return DECLINED;
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"DB user %s not found: %s", r->user, r->filename);
ap_note_basic_auth_failure(r);
return AUTH_REQUIRED;
}
invalid_pw = ap_validate_password(sent_pw, real_pw);
if (invalid_pw != NULL) {
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"DB user %s: authentication failure for \"%s\": %s",
r->user, r->uri, invalid_pw);
ap_note_basic_auth_failure(r);
if (!(groups = get_db_grp(r, user, sec->auth_dbgrpfile))) {
if (!(sec->auth_dbauthoritative))
return DECLINED;
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"user %s not in DB group file %s: %s",
user, sec->auth_dbgrpfile, r->filename);
ap_note_basic_auth_failure(r);
return OK;
}
}
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"user %s not in right group: %s", user, r->filename);
ap_note_basic_auth_failure(r);
return AUTH_REQUIRED;
if (!(f = dbm_open(auth_dbmpwfile, O_RDONLY, 0664))) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, errno, r,
"could not open dbm auth file: %s", auth_dbmpwfile);
return NULL;
}
if (!(real_pw = get_dbm_pw(r, r->user, sec->auth_dbmpwfile))) {
if (!(sec->auth_dbmauthoritative))
return DECLINED;
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"DBM user %s not found: %s", r->user, r->filename);
ap_note_basic_auth_failure(r);
return AUTH_REQUIRED;
}
invalid_pw = ap_validate_password(sent_pw, real_pw);
if (invalid_pw != NULL) {
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"DBM user %s: authentication failure for \"%s\": %s",
r->user, r->uri, invalid_pw);
ap_note_basic_auth_failure(r);
if (!(groups = get_dbm_grp(r, user, sec->auth_dbmgrpfile))) {
if (!(sec->auth_dbmauthoritative))
return DECLINED;
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"user %s not in DBM group file %s: %s",
user, sec->auth_dbmgrpfile, r->filename);
ap_note_basic_auth_failure(r);
return OK;
}
}
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"user %s not in right group: %s",
user, r->filename);
ap_note_basic_auth_failure(r);
mm_unlock(client_mm);
if (entry)
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_DEBUG, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_DEBUG, 0, r,
"get_client(): client %lu found", key);
else
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_DEBUG, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_DEBUG, 0, r,
"get_client(): client %lu not found", key);
return entry;
mm_unlock(opaque_mm);
if (!(entry = add_client(op, &new, r->server))) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
"Digest: failed to allocate client entry - ignoring "
"client");
return NULL;
char *w, *x;
if (!(f = ap_pcfg_openfile(r->pool, auth_pwfile))) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, errno, r,
"Digest: Could not open password file: %s", auth_pwfile);
return NULL;
}
nc = strtol(snc, &endptr, 16);
if (endptr < (snc+strlen(snc)) && !ap_isspace(*endptr)) {
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"Digest: invalid nc %s received - not a number", snc);
return !OK;
}
return !OK;
if (nc != resp->client->nonce_count) {
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_DEBUG, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_DEBUG, 0, r,
"nonce-count check failed: %lu != %lu", nc,
resp->client->nonce_count);
return !OK;
char tmp, hash[NONCE_HASH_LEN+1];
if (strlen(resp->nonce) != NONCE_LEN) {
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"Digest: invalid nonce %s received - length is not %d",
resp->nonce, NONCE_LEN);
note_digest_auth_failure(r, conf, resp, 1);
resp->nonce_time = nonce_time.time;
if (strcmp(hash, resp->nonce+NONCE_TIME_LEN)) {
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"Digest: invalid nonce %s received - hash is not %s",
resp->nonce, hash);
note_digest_auth_failure(r, conf, resp, 1);
dt = difftime(r->request_time, nonce_time.time);
if (conf->nonce_lifetime > 0 && dt < 0) {
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"Digest: invalid nonce %s received - user attempted "
"time travel", resp->nonce);
note_digest_auth_failure(r, conf, resp, 1);
if (conf->nonce_lifetime > 0) {
if (dt > conf->nonce_lifetime) {
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, 0,r,
"Digest: user %s: nonce expired - sending new nonce",
r->connection->user);
note_digest_auth_failure(r, conf, resp, 1);
}
else if (conf->nonce_lifetime == 0 && resp->client) {
if (memcmp(resp->client->last_nonce, resp->nonce, NONCE_LEN)) {
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, 0, r,
"Digest: user %s: one-time-nonce mismatch - sending "
"new nonce", r->connection->user);
note_digest_auth_failure(r, conf, resp, 1);
return DECLINED;
if (!ap_auth_name(r)) {
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"Digest: need AuthName: %s", r->uri);
return SERVER_ERROR;
}
if (resp->auth_hdr_sts != VALID) {
if (resp->auth_hdr_sts == NOT_DIGEST)
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"Digest: client used wrong authentication scheme "
"`%s': %s", resp->scheme, r->uri);
else if (resp->auth_hdr_sts == INVALID)
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"Digest: missing user, realm, nonce, uri, or digest "
"in authorization header: %s", r->uri);
/* else (resp->auth_hdr_sts == NO_HEADER) */
&& (!d_uri.query || !r_uri->query
|| strcmp(d_uri.query, r_uri->query)))
) {
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"Digest: uri mismatch - <%s> does not match "
"request-uri <%s>", resp->uri,
ap_unparse_uri_components(r->pool, r_uri, 0));
}
if (resp->opaque && resp->opaque_num == 0) {
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"Digest: received invalid opaque - got `%s'",
resp->opaque);
note_digest_auth_failure(r, conf, resp, 0);
}
if (strcmp(resp->realm, conf->realm)) {
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"Digest: realm mismatch - got `%s' but expected `%s'",
resp->realm, conf->realm);
note_digest_auth_failure(r, conf, resp, 0);
if (resp->algorithm != NULL
&& strcasecmp(resp->algorithm, "MD5")
&& strcasecmp(resp->algorithm, "MD5-sess")) {
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"Digest: unknown algorithm `%s' received: %s",
resp->algorithm, r->uri);
note_digest_auth_failure(r, conf, resp, 0);
return DECLINED;
if (!(conf->ha1 = get_hash(r, conn->user, conf->realm, conf->pwfile))) {
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"Digest: user `%s' in realm `%s' not found: %s",
conn->user, conf->realm, r->uri);
note_digest_auth_failure(r, conf, resp, 0);
if (resp->message_qop == NULL) {
/* old (rfc-2069) style digest */
if (strcmp(resp->digest, old_digest(r, resp, conf->ha1))) {
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"Digest: user %s: password mismatch: %s", conn->user,
r->uri);
note_digest_auth_failure(r, conf, resp, 0);
if (!match
&& !(conf->qop_list[0] == NULL
&& !strcasecmp(resp->message_qop, "auth"))) {
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"Digest: invalid qop `%s' received: %s",
resp->message_qop, r->uri);
note_digest_auth_failure(r, conf, resp, 0);
}
if (strcmp(resp->digest, new_digest(r, resp, conf))) {
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"Digest: user %s: password mismatch: %s", conn->user,
r->uri);
note_digest_auth_failure(r, conf, resp, 0);
{
configfile_t *f;
table *grps = ap_make_table(r->pool, 15);
- pool *sp;
+ ap_context_t *sp;
char l[MAX_STRING_LEN];
const char *group_name, *ll, *w;
if (!(f = ap_pcfg_openfile(r->pool, grpfile))) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, errno, r,
"Digest: Could not open group file: %s", grpfile);
return NULL;
}
- sp = ap_make_sub_pool(r->pool);
+ if (ap_create_context(&sp, r->pool) != APR_SUCCESS)
+ return NULL;
while (!(ap_cfg_getline(l, MAX_STRING_LEN, f))) {
if ((l[0] == '#') || (!l[0]))
}
}
else {
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"Digest: access to %s failed, reason: unknown require "
"directive \"%s\"", r->uri, reqs[x].requirement);
return DECLINED;
if (!method_restricted)
return OK;
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"Digest: access to %s failed, reason: user %s not allowed access",
r->uri, user);
in = strchr(in, '}');
if (in == NULL) {
ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR,
- r, "Missing '}' on variable \"%s\"",
+ 0, r, "Missing '}' on variable \"%s\"",
expansion);
*next = '\0';
return;
ap_chdir_file(r->filename);
if (error_fmt) {
ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR,
- r, error_fmt, tag_val, r->filename);
+ 0, r, error_fmt, tag_val, r->filename);
ap_rputs(error, r);
}
return 0;
}
else {
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"unknown parameter \"%s\" to tag include in %s",
tag, r->filename);
ap_rputs(error, r);
if (!ap_bspawn_child(r->pool, include_cmd_child, &arg,
kill_after_timeout, NULL, &script_in, NULL)) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, errno, r,
"couldn't spawn include command");
return -1;
}
if (!strcmp(tag, "cmd")) {
parse_string(r, tag_val, parsed_string, sizeof(parsed_string), 1);
if (include_cmd(parsed_string, r) == -1) {
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"execution failure for parameter \"%s\" "
"to tag exec in file %s",
tag, r->filename);
else if (!strcmp(tag, "cgi")) {
parse_string(r, tag_val, parsed_string, sizeof(parsed_string), 0);
if (include_cgi(parsed_string, r) == -1) {
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"invalid CGI ref \"%s\" in %s", tag_val, file);
ap_rputs(error, r);
}
return 0;
}
else {
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"unknown parameter \"%s\" to tag exec in %s",
tag, file);
ap_rputs(error, r);
return 0;
}
else {
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"unknown parameter \"%s\" to tag echo in %s",
tag, r->filename);
ap_rputs(error, r);
AV *av = newAV();
if (ap_allow_options(r) & OPT_INCNOEXEC) {
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"#perl SSI disallowed by IncludesNoExec in %s",
r->filename);
return DECLINED;
return 0;
}
else {
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"unknown parameter \"%s\" to tag config in %s",
tag, r->filename);
ap_rputs(error, r);
if (error_fmt) {
ret = -1;
- ap_log_rerror(APLOG_MARK, APLOG_ERR, r, error_fmt, to_send, r->filename);
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, error_fmt, to_send, r->filename);
ap_rputs(error, r);
}
return 0;
}
else {
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"unable to get information about \"%s\" "
"in parsed file %s",
tag_val, r->filename);
}
}
else {
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"unknown parameter \"%s\" to tag %s in %s",
tag, directive, r->filename);
ap_rputs(error, r);
compiled = ap_pregcomp(r->pool, rexp, REG_EXTENDED | REG_NOSUB);
if (compiled == NULL) {
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"unable to compile pattern \"%s\"", rexp);
return -1;
}
return (0);
}
root = current = (struct parse_node *) NULL;
- expr_pool = ap_make_sub_pool(r->pool);
+ if (ap_create_context(&expr_pool, r->pool) != APR_SUCCESS)
+ return 0;
/* Create Parse Tree */
while (1) {
current = current->right = new;
break;
default:
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"Invalid expression \"%s\" in file %s",
expr, r->filename);
ap_rputs(error, r);
ap_rputs(" Token: and/or\n", r);
#endif
if (current == (struct parse_node *) NULL) {
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"Invalid expression \"%s\" in file %s",
expr, r->filename);
ap_rputs(error, r);
case token_lbrace:
break;
default:
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"Invalid expression \"%s\" in file %s",
expr, r->filename);
ap_rputs(error, r);
case token_lt:
break;
default:
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"Invalid expression \"%s\" in file %s",
expr, r->filename);
ap_rputs(error, r);
ap_rputs(" Token: eq/ne/ge/gt/le/lt\n", r);
#endif
if (current == (struct parse_node *) NULL) {
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"Invalid expression \"%s\" in file %s",
expr, r->filename);
ap_rputs(error, r);
case token_le:
case token_lt:
default:
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"Invalid expression \"%s\" in file %s",
expr, r->filename);
ap_rputs(error, r);
current = current->parent;
}
if (current == (struct parse_node *) NULL) {
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"Unmatched ')' in \"%s\" in file %s",
expr, r->filename);
ap_rputs(error, r);
case token_string:
case token_group:
default:
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"Invalid expression \"%s\" in file %s",
expr, r->filename);
ap_rputs(error, r);
#endif
if (current->left == (struct parse_node *) NULL ||
current->right == (struct parse_node *) NULL) {
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"Invalid expression \"%s\" in file %s",
expr, r->filename);
ap_rputs(error, r);
(current->right == (struct parse_node *) NULL) ||
(current->left->token.type != token_string) ||
(current->right->token.type != token_string)) {
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"Invalid expression \"%s\" in file %s",
expr, r->filename);
ap_rputs(error, r);
current->right->token.value[len - 1] = '\0';
}
else {
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"Invalid rexp \"%s\" in file %s",
current->right->token.value, r->filename);
ap_rputs(error, r);
(current->right == (struct parse_node *) NULL) ||
(current->left->token.type != token_string) ||
(current->right->token.type != token_string)) {
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"Invalid expression \"%s\" in file %s",
expr, r->filename);
ap_rputs(error, r);
break;
case token_lbrace:
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"Unmatched '(' in \"%s\" in file %s",
expr, r->filename);
ap_rputs(error, r);
goto RETURN;
case token_rbrace:
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"Unmatched ')' in \"%s\" in file %s",
expr, r->filename);
ap_rputs(error, r);
goto RETURN;
default:
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"bad token type");
ap_rputs(error, r);
goto RETURN;
}
else if (!strcmp(tag, "done")) {
if (expr == NULL) {
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"missing expr in if statement: %s",
r->filename);
ap_rputs(error, r);
#endif
}
else {
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"unknown parameter \"%s\" to tag if in %s",
tag, r->filename);
ap_rputs(error, r);
return (0);
}
if (expr == NULL) {
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"missing expr in elif statement: %s",
r->filename);
ap_rputs(error, r);
#endif
}
else {
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"unknown parameter \"%s\" to tag if in %s",
tag, r->filename);
ap_rputs(error, r);
return 0;
}
else {
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"else directive does not take tags in %s",
r->filename);
if (*printing) {
return 0;
}
else {
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"endif directive does not take tags in %s",
r->filename);
ap_rputs(error, r);
}
else if (!strcmp(tag, "value")) {
if (var == (char *) NULL) {
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"variable must precede value in set directive in %s",
r->filename);
ap_rputs(error, r);
ap_table_setn(r->subprocess_env, var, ap_pstrdup(r->pool, parsed_string));
}
else {
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"Invalid tag for set directive in %s", r->filename);
ap_rputs(error, r);
return -1;
return 0;
}
else {
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"printenv directive does not take tags in %s",
r->filename);
ap_rputs(error, r);
while (1) {
if (!find_string(f, STARTING_SEQUENCE, r, printing)) {
if (get_directive(f, directive, sizeof(directive), r->pool)) {
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"mod_include: error reading directive in %s",
r->filename);
ap_rputs(error, r);
}
if (!strcmp(directive, "exec")) {
if (noexec) {
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"exec used but not allowed in %s",
r->filename);
if (printing) {
}
#endif
else {
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"unknown directive \"%s\" "
"in parsed doc %s",
directive, r->filename);
ret = find_string(f, ENDING_SEQUENCE, r, 0);
}
if (ret) {
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"premature EOF in parsed file %s",
r->filename);
return;
return DECLINED;
}
if (r->finfo.st_mode == 0) {
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"File does not exist: %s",
(r->path_info
? ap_pstrcat(r->pool, r->filename, r->path_info, NULL)
}
if (!(f = ap_pfopen(r->pool, r->filename, "r"))) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, errno, r,
"file permissions deny server access: %s", r->filename);
return HTTP_FORBIDDEN;
}
fp = ap_pcfg_openfile(p, filename);
if (!fp) {
- ap_log_rerror(APLOG_MARK, APLOG_WARNING, r,
+ ap_log_rerror(APLOG_MARK, APLOG_WARNING, errno, r,
"mod_info: couldn't open config file %s",
filename);
return NULL;
* we can actually use it!
*/
if (!proxy_available) {
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"attempt to make remote request from mod_rewrite "
"without proxy enabled: %s", r->filename);
return FORBIDDEN;
*/
if (!(ap_allow_options(r) & (OPT_SYM_LINKS | OPT_SYM_OWNER))) {
/* FollowSymLinks is mandatory! */
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"Options FollowSymLinks or SymLinksIfOwnerMatch is off "
"which implies that RewriteRule directive is forbidden: "
"%s", r->filename);
n = strlen(cpT);
if (cpO + n >= newuri + sizeof(newuri)) {
ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR,
- r, "insufficient space in "
+ 0, r, "insufficient space in "
"expand_map_lookups, aborting");
return;
}
n = strlen(defaultvalue);
if (cpO + n >= newuri + sizeof(newuri)) {
ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR,
- r, "insufficient space in "
+ 0, r, "insufficient space in "
"expand_map_lookups, aborting");
return;
}
n = cpT-cpI;
if (cpO + n >= newuri + sizeof(newuri)) {
ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR,
- r, "insufficient space in "
+ 0, r, "insufficient space in "
"expand_map_lookups, aborting");
return;
}
if (strcmp(s->name, name) == 0) {
if (s->type == MAPTYPE_TXT) {
if (stat(s->checkfile, &st) == -1) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
"mod_rewrite: can't access text RewriteMap "
"file %s", s->checkfile);
rewritelog(r, 1, "can't open RewriteMap file, "
else if (s->type == MAPTYPE_DBM) {
#ifndef NO_DBM_REWRITEMAP
if (stat(s->checkfile, &st) == -1) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, errno, r,
"mod_rewrite: can't access DBM RewriteMap "
"file %s", s->checkfile);
rewritelog(r, 1, "can't open DBM RewriteMap file, "
}
else if (s->type == MAPTYPE_RND) {
if (stat(s->checkfile, &st) == -1) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, errno, r,
"mod_rewrite: can't access text RewriteMap "
"file %s", s->checkfile);
rewritelog(r, 1, "can't open RewriteMap file, "
cache *c;
c = (cache *)ap_palloc(p, sizeof(cache));
- c->pool = ap_make_sub_pool(p);
+ if (ap_create_context(&c->pool, p) != APR_SUCCESS)
+ return NULL;
c->lists = ap_make_array(c->pool, 2, sizeof(cachelist));
return c;
}
#endif
if (rc < 0) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, errno, r,
"mod_rewrite: failed to lock file descriptor");
exit(1);
}
#endif
if (rc < 0) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, errno, r,
"mod_rewrite: failed to unlock file descriptor");
exit(1);
}
/* if we see a bogus header don't ignore it. Shout and scream */
if (!(l = strchr(w, ':'))) {
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"malformed header in meta file: %s", r->filename);
return SERVER_ERROR;
}
}
else {
/* no last slash, buh?! */
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"internal error in mod_cern_meta: %s", r->filename);
/* should really barf, but hey, let's be friends... */
return DECLINED;
if (errno == ENOENT) {
return DECLINED;
}
- ap_log_rerror(APLOG_MARK, APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
"meta file permissions deny server access: %s", metafilename);
return FORBIDDEN;
};
conf = (expires_dir_config *) ap_get_module_config(r->per_dir_config, &expires_module);
if (conf == NULL) {
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"internal error: %s", r->filename);
return SERVER_ERROR;
};
/* expecting the add_* routines to be case-hardened this
* is just a reminder that module is beta
*/
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"internal error: bad expires code: %s", r->filename);
return SERVER_ERROR;
};
/* clean up and return */
result[res_pos] = 0;
#if MIME_MAGIC_DEBUG
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO | APLOG_DEBUG, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO | APLOG_DEBUG, 0, r,
MODNAME ": rsl_strdup() %d chars: %s", res_pos - 1, result);
#endif
return result;
else {
/* should not be possible */
/* abandon malfunctioning module */
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO | APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO | APLOG_ERR, 0, r,
MODNAME ": bad state %d (ws)", state);
return DECLINED;
}
else {
/* should not be possible */
/* abandon malfunctioning module */
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO | APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO | APLOG_ERR, 0, r,
MODNAME ": bad state %d (ns)", state);
return DECLINED;
}
if ((fd = ap_popenf(r->pool, r->filename, O_RDONLY, 0)) < 0) {
/* We can't open it, but we were able to stat it. */
- ap_log_rerror(APLOG_MARK, APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
MODNAME ": can't read `%s'", r->filename);
/* let some other handler decide what the problem is */
return DECLINED;
* try looking at the first HOWMANY bytes
*/
if ((nbytes = read(fd, (char *) buf, sizeof(buf) - 1)) == -1) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, errno, r,
MODNAME ": read failed: %s", r->filename);
return HTTP_INTERNAL_SERVER_ERROR;
}
/* We used stat(), the only possible reason for this is that the
* symlink is broken.
*/
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO | APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO | APLOG_ERR, 0, r,
MODNAME ": broken symlink (%s)", fn);
return HTTP_INTERNAL_SERVER_ERROR;
#endif
case S_IFREG:
break;
default:
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO | APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO | APLOG_ERR, 0, r,
MODNAME ": invalid mode 0%o.", (unsigned int)r->finfo.st_mode);
return HTTP_INTERNAL_SERVER_ERROR;
}
struct magic *m;
#if MIME_MAGIC_DEBUG
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO | APLOG_DEBUG, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO | APLOG_DEBUG, 0, r,
MODNAME ": match conf=%x file=%s m=%s m->next=%s last=%s",
conf,
conf->magicfile ? conf->magicfile : "NULL",
ap_isprint((((unsigned long) m) >> 16) & 255) &&
ap_isprint((((unsigned long) m) >> 8) & 255) &&
ap_isprint(((unsigned long) m) & 255)) {
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO | APLOG_DEBUG, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO | APLOG_DEBUG, 0, r,
MODNAME ": match: POINTER CLOBBERED! "
"m=\"%c%c%c%c\"",
(((unsigned long) m) >> 24) & 255,
for (m = conf->magic; m; m = m->next) {
#if MIME_MAGIC_DEBUG
rule_counter++;
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO | APLOG_DEBUG, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO | APLOG_DEBUG, 0, r,
MODNAME ": line=%d desc=%s", m->lineno, m->desc);
#endif
while (m_cont && (m_cont->cont_level != 0)) {
#if MIME_MAGIC_DEBUG
rule_counter++;
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO | APLOG_DEBUG, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO | APLOG_DEBUG, 0, r,
MODNAME ": line=%d mc=%x mc->next=%x cont=%d desc=%s",
m_cont->lineno, m_cont,
m_cont->next, m_cont->cont_level,
/* if we get here, the main entry rule was a match */
/* this will be the last run through the loop */
#if MIME_MAGIC_DEBUG
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO | APLOG_DEBUG, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO | APLOG_DEBUG, 0, r,
MODNAME ": rule matched, line=%d type=%d %s",
m->lineno, m->type,
(m->type == STRING) ? m->value.s : "");
m = m->next;
while (m && (m->cont_level != 0)) {
#if MIME_MAGIC_DEBUG
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO | APLOG_DEBUG, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO | APLOG_DEBUG, 0, r,
MODNAME ": match line=%d cont=%d type=%d %s",
m->lineno, m->cont_level, m->type,
(m->type == STRING) ? m->value.s : "");
m = m->next;
}
#if MIME_MAGIC_DEBUG
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO | APLOG_DEBUG, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO | APLOG_DEBUG, 0, r,
MODNAME ": matched after %d rules", rule_counter);
#endif
return 1; /* all through */
}
#if MIME_MAGIC_DEBUG
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO | APLOG_DEBUG, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO | APLOG_DEBUG, 0, r,
MODNAME ": failed after %d rules", rule_counter);
#endif
return 0; /* no match at all */
(void) magic_rsl_printf(r, m->desc, pp);
return;
default:
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO | APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO | APLOG_ERR, 0, r,
MODNAME ": invalid m->type (%d) in mprint().",
m->type);
return;
((p->hl[3] << 24) | (p->hl[2] << 16) | (p->hl[1] << 8) | (p->hl[0]));
return 1;
default:
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO | APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO | APLOG_ERR, 0, r,
MODNAME ": invalid type %d in mconvert().", m->type);
return 0;
}
int matched;
if ((m->value.s[0] == 'x') && (m->value.s[1] == '\0')) {
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO | APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO | APLOG_ERR, 0, r,
MODNAME ": BOINK");
return 1;
}
break;
default:
/* bogosity, pretend that it just wasn't a match */
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO | APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO | APLOG_ERR, 0, r,
MODNAME ": invalid type %d in mcheck().", m->type);
return 0;
}
switch (m->reln) {
case 'x':
#if MIME_MAGIC_DEBUG
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO | APLOG_DEBUG, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO | APLOG_DEBUG, 0, r,
"%lu == *any* = 1", v);
#endif
matched = 1;
case '!':
matched = v != l;
#if MIME_MAGIC_DEBUG
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO | APLOG_DEBUG, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO | APLOG_DEBUG, 0, r,
"%lu != %lu = %d", v, l, matched);
#endif
break;
case '=':
matched = v == l;
#if MIME_MAGIC_DEBUG
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO | APLOG_DEBUG, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO | APLOG_DEBUG, 0, r,
"%lu == %lu = %d", v, l, matched);
#endif
break;
if (m->flag & UNSIGNED) {
matched = v > l;
#if MIME_MAGIC_DEBUG
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO | APLOG_DEBUG, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO | APLOG_DEBUG, 0, r,
"%lu > %lu = %d", v, l, matched);
#endif
}
else {
matched = (long) v > (long) l;
#if MIME_MAGIC_DEBUG
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO | APLOG_DEBUG, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO | APLOG_DEBUG, 0, r,
"%ld > %ld = %d", v, l, matched);
#endif
}
if (m->flag & UNSIGNED) {
matched = v < l;
#if MIME_MAGIC_DEBUG
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO | APLOG_DEBUG, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO | APLOG_DEBUG, 0, r,
"%lu < %lu = %d", v, l, matched);
#endif
}
else {
matched = (long) v < (long) l;
#if MIME_MAGIC_DEBUG
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO | APLOG_DEBUG, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO | APLOG_DEBUG, 0, r,
"%ld < %ld = %d", v, l, matched);
#endif
}
case '&':
matched = (v & l) == l;
#if MIME_MAGIC_DEBUG
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO | APLOG_DEBUG, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO | APLOG_DEBUG, 0, r,
"((%lx & %lx) == %lx) = %d", v, l, l, matched);
#endif
break;
case '^':
matched = (v & l) != l;
#if MIME_MAGIC_DEBUG
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO | APLOG_DEBUG, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO | APLOG_DEBUG, 0, r,
"((%lx & %lx) != %lx) = %d", v, l, l, matched);
#endif
break;
default:
/* bogosity, pretend it didn't match */
matched = 0;
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO | APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO | APLOG_ERR, 0, r,
MODNAME ": mcheck: can't happen: invalid relation %d.",
m->reln);
break;
child_pid = ap_spawnvp(compr[parm->method].argv[0],
new_argv);
if (child_pid == -1)
- ap_log_rerror(APLOG_MARK, APLOG_ERR, parm->r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, errno, parm->r,
MODNAME ": could not execute `%s'.",
compr[parm->method].argv[0]);
return (child_pid);
* there are cases (i.e. generating directory indicies with mod_autoindex)
* where we would end up with LOTS of zombies.
*/
- sub_pool = ap_make_sub_pool(r->pool);
+ if (ap_create_context(&sub_pool, r->pool) != APR_SUCCESS)
+ return -1;
if (!ap_bspawn_child(sub_pool, uncompress_child, &parm, kill_always,
NULL, &bout, NULL)) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, errno, r,
MODNAME ": couldn't spawn uncompress process: %s", r->uri);
return -1;
}
*newch = (unsigned char *) ap_palloc(r->pool, n);
if ((n = ap_bread(bout, *newch, n)) <= 0) {
ap_destroy_pool(sub_pool);
- ap_log_rerror(APLOG_MARK, APLOG_ERR, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, errno, r,
MODNAME ": read failed %s", r->filename);
return -1;
}
request_rec *sub;
#if MIME_MAGIC_DEBUG
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO | APLOG_DEBUG, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO | APLOG_DEBUG, 0, r,
MODNAME ": revision_suffix checking %s", r->filename);
#endif /* MIME_MAGIC_DEBUG */
result = 0;
sub_filename = ap_pstrndup(r->pool, r->filename, suffix_pos);
#if MIME_MAGIC_DEBUG
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO | APLOG_DEBUG, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO | APLOG_DEBUG, 0, r,
MODNAME ": subrequest lookup for %s", sub_filename);
#endif /* MIME_MAGIC_DEBUG */
sub = ap_sub_req_lookup_file(sub_filename, r);
if (sub->content_type) {
r->content_type = ap_pstrdup(r->pool, sub->content_type);
#if MIME_MAGIC_DEBUG
- ap_log_rerror(APLOG_MARK, APLOG_NOERRNO | APLOG_DEBUG, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO | APLOG_DEBUG, 0, r,
MODNAME ": subrequest %s got %s",
sub_filename, r->content_type);
#endif /* MIME_MAGIC_DEBUG */