diff options
Diffstat (limited to 'modules/aaa/mod_auth_digest.c')
-rw-r--r-- | modules/aaa/mod_auth_digest.c | 69 |
1 files changed, 34 insertions, 35 deletions
diff --git a/modules/aaa/mod_auth_digest.c b/modules/aaa/mod_auth_digest.c index ad338e8a39..77240b662c 100644 --- a/modules/aaa/mod_auth_digest.c +++ b/modules/aaa/mod_auth_digest.c @@ -201,7 +201,7 @@ module AP_MODULE_DECLARE_DATA auth_digest_module; static apr_status_t cleanup_tables(void *not_used) { ap_log_error(APLOG_MARK, APLOG_INFO, 0, NULL, - "Digest: cleaning up shared memory"); + "cleaning up shared memory"); if (client_rmm) { apr_rmm_destroy(client_rmm); @@ -231,7 +231,7 @@ static apr_status_t initialize_secret(server_rec *s) apr_status_t status; ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, s, - "Digest: generating secret for digest authentication ..."); + "generating secret for digest authentication ..."); #if APR_HAS_RANDOM status = apr_generate_random_bytes(secret, sizeof(secret)); @@ -242,12 +242,12 @@ static apr_status_t initialize_secret(server_rec *s) if (status != APR_SUCCESS) { char buf[120]; ap_log_error(APLOG_MARK, APLOG_CRIT, status, s, - "Digest: error generating secret: %s", + "error generating secret: %s", apr_strerror(status, buf, sizeof(buf))); return status; } - ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, "Digest: done"); + ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, "done"); return APR_SUCCESS; } @@ -255,7 +255,7 @@ static apr_status_t initialize_secret(server_rec *s) static void log_error_and_cleanup(char *msg, apr_status_t sts, server_rec *s) { ap_log_error(APLOG_MARK, APLOG_ERR, sts, s, - "Digest: %s - all nonce-count checking, one-time nonces, and " + "%s - all nonce-count checking, one-time nonces, and " "MD5-sess algorithm disabled", msg); cleanup_tables(NULL); @@ -672,7 +672,7 @@ static const char *set_shmem_size(cmd_parms *cmd, void *config, num_buckets = 1; } ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, cmd->server, - "Digest: Set shmem-size: %" APR_SIZE_T_FMT ", num-buckets: %ld", + "Set shmem-size: %" APR_SIZE_T_FMT ", num-buckets: %ld", shmem_size, num_buckets); return NULL; @@ -861,7 +861,7 @@ static client_entry *add_client(unsigned long key, client_entry *info, if (!entry) { long num_removed = gc(); ap_log_error(APLOG_MARK, APLOG_INFO, 0, s, - "Digest: gc'd %ld client entries. Total new clients: " + "gc'd %ld client entries. Total new clients: " "%ld; Total removed clients: %ld; Total renewed clients: " "%ld", num_removed, client_list->num_created - client_list->num_renewed, @@ -1145,8 +1145,7 @@ static client_entry *gen_client(const request_rec *r) if (!(entry = add_client(op, &new_entry, r->server))) { ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, - "Digest: failed to allocate client entry - ignoring " - "client"); + "failed to allocate client entry - ignoring client"); return NULL; } @@ -1466,7 +1465,7 @@ static int check_nc(const request_rec *r, const digest_header_rec *resp, if (conf->check_nc && !client_shm) { /* Shouldn't happen, but just in case... */ ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, - "Digest: cannot check nonce count without shared memory"); + "cannot check nonce count without shared memory"); return OK; } @@ -1480,7 +1479,7 @@ static int check_nc(const request_rec *r, const digest_header_rec *resp, /* qop is none, client must not send a nonce count */ if (snc != NULL) { ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, - "Digest: invalid nc %s received - no nonce count allowed when qop=none", + "invalid nc %s received - no nonce count allowed when qop=none", snc); return !OK; } @@ -1491,7 +1490,7 @@ static int check_nc(const request_rec *r, const digest_header_rec *resp, nc = strtol(snc, &endptr, 16); if (endptr < (snc+strlen(snc)) && !apr_isspace(*endptr)) { ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, - "Digest: invalid nc %s received - not a number", snc); + "invalid nc %s received - not a number", snc); return !OK; } @@ -1501,7 +1500,7 @@ static int check_nc(const request_rec *r, const digest_header_rec *resp, if (nc != resp->client->nonce_count) { ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, - "Digest: Warning, possible replay attack: nonce-count " + "Warning, possible replay attack: nonce-count " "check failed: %lu != %lu", nc, resp->client->nonce_count); return !OK; @@ -1519,7 +1518,7 @@ static int check_nonce(request_rec *r, digest_header_rec *resp, if (strlen(resp->nonce) != NONCE_LEN) { ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, - "Digest: invalid nonce %s received - length is not %d", + "invalid nonce %s received - length is not %d", resp->nonce, NONCE_LEN); note_digest_auth_failure(r, conf, resp, 1); return HTTP_UNAUTHORIZED; @@ -1534,7 +1533,7 @@ static int check_nonce(request_rec *r, digest_header_rec *resp, if (strcmp(hash, resp->nonce+NONCE_TIME_LEN)) { ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, - "Digest: invalid nonce %s received - hash is not %s", + "invalid nonce %s received - hash is not %s", resp->nonce, hash); note_digest_auth_failure(r, conf, resp, 1); return HTTP_UNAUTHORIZED; @@ -1543,7 +1542,7 @@ static int check_nonce(request_rec *r, digest_header_rec *resp, dt = r->request_time - nonce_time.time; if (conf->nonce_lifetime > 0 && dt < 0) { ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, - "Digest: invalid nonce %s received - user attempted " + "invalid nonce %s received - user attempted " "time travel", resp->nonce); note_digest_auth_failure(r, conf, resp, 1); return HTTP_UNAUTHORIZED; @@ -1552,7 +1551,7 @@ static int check_nonce(request_rec *r, digest_header_rec *resp, if (conf->nonce_lifetime > 0) { if (dt > conf->nonce_lifetime) { ap_log_rerror(APLOG_MARK, APLOG_INFO, 0,r, - "Digest: user %s: nonce expired (%.2f seconds old " + "user %s: nonce expired (%.2f seconds old " "- max lifetime %.2f) - sending new nonce", r->user, (double)apr_time_sec(dt), (double)apr_time_sec(conf->nonce_lifetime)); @@ -1563,7 +1562,7 @@ static int check_nonce(request_rec *r, digest_header_rec *resp, else if (conf->nonce_lifetime == 0 && resp->client) { if (memcmp(resp->client->last_nonce, resp->nonce, NONCE_LEN)) { ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, - "Digest: user %s: one-time-nonce mismatch - sending " + "user %s: one-time-nonce mismatch - sending " "new nonce", r->user); note_digest_auth_failure(r, conf, resp, 1); return HTTP_UNAUTHORIZED; @@ -1699,7 +1698,7 @@ static int authenticate_digest_user(request_rec *r) if (!ap_auth_name(r)) { ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, - "Digest: need AuthName: %s", r->uri); + "need AuthName: %s", r->uri); return HTTP_INTERNAL_SERVER_ERROR; } @@ -1729,12 +1728,12 @@ static int authenticate_digest_user(request_rec *r) if (resp->auth_hdr_sts != VALID) { if (resp->auth_hdr_sts == NOT_DIGEST) { ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, - "Digest: client used wrong authentication scheme " - "`%s': %s", resp->scheme, r->uri); + "client used wrong authentication scheme `%s': %s", + resp->scheme, r->uri); } else if (resp->auth_hdr_sts == INVALID) { ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, - "Digest: missing user, realm, nonce, uri, digest, " + "missing user, realm, nonce, uri, digest, " "cnonce, or nonce_count in authorization header: %s", r->uri); } @@ -1757,7 +1756,7 @@ static int authenticate_digest_user(request_rec *r) copy_uri_components(&r_uri, resp->psd_request_uri, r); if (apr_uri_parse(r->pool, resp->uri, &d_uri) != APR_SUCCESS) { ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, - "Digest: invalid uri <%s> in Authorization header", + "invalid uri <%s> in Authorization header", resp->uri); return HTTP_BAD_REQUEST; } @@ -1791,7 +1790,7 @@ static int authenticate_digest_user(request_rec *r) if (apr_table_get(r->subprocess_env, "AuthDigestEnableQueryStringHack")) { - ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, "Digest: " + ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, "applying AuthDigestEnableQueryStringHack " "to uri <%s>", resp->raw_request_uri); @@ -1802,7 +1801,7 @@ static int authenticate_digest_user(request_rec *r) if (r->method_number == M_CONNECT) { if (!r_uri.hostinfo || strcmp(resp->uri, r_uri.hostinfo)) { ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, - "Digest: uri mismatch - <%s> does not match " + "uri mismatch - <%s> does not match " "request-uri <%s>", resp->uri, r_uri.hostinfo); return HTTP_BAD_REQUEST; } @@ -1830,7 +1829,7 @@ static int authenticate_digest_user(request_rec *r) || strcmp(d_uri.query, r_uri.query))) ) { ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, - "Digest: uri mismatch - <%s> does not match " + "uri mismatch - <%s> does not match " "request-uri <%s>", resp->uri, resp->raw_request_uri); return HTTP_BAD_REQUEST; } @@ -1838,7 +1837,7 @@ static int authenticate_digest_user(request_rec *r) if (resp->opaque && resp->opaque_num == 0) { ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, - "Digest: received invalid opaque - got `%s'", + "received invalid opaque - got `%s'", resp->opaque); note_digest_auth_failure(r, conf, resp, 0); return HTTP_UNAUTHORIZED; @@ -1846,7 +1845,7 @@ static int authenticate_digest_user(request_rec *r) if (strcmp(resp->realm, conf->realm)) { ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, - "Digest: realm mismatch - got `%s' but expected `%s'", + "realm mismatch - got `%s' but expected `%s'", resp->realm, conf->realm); note_digest_auth_failure(r, conf, resp, 0); return HTTP_UNAUTHORIZED; @@ -1856,7 +1855,7 @@ static int authenticate_digest_user(request_rec *r) && strcasecmp(resp->algorithm, "MD5") && strcasecmp(resp->algorithm, "MD5-sess")) { ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, - "Digest: unknown algorithm `%s' received: %s", + "unknown algorithm `%s' received: %s", resp->algorithm, r->uri); note_digest_auth_failure(r, conf, resp, 0); return HTTP_UNAUTHORIZED; @@ -1866,7 +1865,7 @@ static int authenticate_digest_user(request_rec *r) if (return_code == AUTH_USER_NOT_FOUND) { ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, - "Digest: user `%s' in realm `%s' not found: %s", + "user `%s' in realm `%s' not found: %s", r->user, conf->realm, r->uri); note_digest_auth_failure(r, conf, resp, 0); return HTTP_UNAUTHORIZED; @@ -1877,7 +1876,7 @@ static int authenticate_digest_user(request_rec *r) else if (return_code == AUTH_DENIED) { /* authentication denied in the provider before attempting a match */ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, - "Digest: user `%s' in realm `%s' denied by provider: %s", + "user `%s' in realm `%s' denied by provider: %s", r->user, conf->realm, r->uri); note_digest_auth_failure(r, conf, resp, 0); return HTTP_UNAUTHORIZED; @@ -1894,7 +1893,7 @@ static int authenticate_digest_user(request_rec *r) /* old (rfc-2069) style digest */ if (strcmp(resp->digest, old_digest(r, resp, conf->ha1))) { ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, - "Digest: user %s: password mismatch: %s", r->user, + "user %s: password mismatch: %s", r->user, r->uri); note_digest_auth_failure(r, conf, resp, 0); return HTTP_UNAUTHORIZED; @@ -1914,7 +1913,7 @@ static int authenticate_digest_user(request_rec *r) && !(conf->qop_list[0] == NULL && !strcasecmp(resp->message_qop, "auth"))) { ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, - "Digest: invalid qop `%s' received: %s", + "invalid qop `%s' received: %s", resp->message_qop, r->uri); note_digest_auth_failure(r, conf, resp, 0); return HTTP_UNAUTHORIZED; @@ -1927,7 +1926,7 @@ static int authenticate_digest_user(request_rec *r) } if (strcmp(resp->digest, exp_digest)) { ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, - "Digest: user %s: password mismatch: %s", r->user, + "user %s: password mismatch: %s", r->user, r->uri); note_digest_auth_failure(r, conf, resp, 0); return HTTP_UNAUTHORIZED; @@ -2007,7 +2006,7 @@ static int add_auth_info(request_rec *r) ha1 = get_session_HA1(r, resp, conf, 0); if (!ha1) { ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, - "Digest: internal error: couldn't find session " + "internal error: couldn't find session " "info for user %s", resp->username); return !OK; } |