diff options
author | Nick Kew <niq@apache.org> | 2010-07-01 00:02:41 +0200 |
---|---|---|
committer | Nick Kew <niq@apache.org> | 2010-07-01 00:02:41 +0200 |
commit | 49b4ce848e261a49bc14b407bf186444cda4bcfd (patch) | |
tree | 71ff3ecdec4d9070b5851721c69b7651b2a8fef7 /modules/aaa | |
parent | To save memory, make module_levels a vector of chars instead of ints. (diff) | |
download | apache2-49b4ce848e261a49bc14b407bf186444cda4bcfd.tar.xz apache2-49b4ce848e261a49bc14b407bf186444cda4bcfd.zip |
Extra robustness check: don't segfault if no socache provider selected
and there's no compile-time default.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@959455 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/aaa')
-rw-r--r-- | modules/aaa/mod_authn_socache.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/aaa/mod_authn_socache.c b/modules/aaa/mod_authn_socache.c index 83ecc83a48..0c358fc6cb 100644 --- a/modules/aaa/mod_authn_socache.c +++ b/modules/aaa/mod_authn_socache.c @@ -87,6 +87,13 @@ static int authn_cache_post_config(apr_pool_t *pconf, apr_pool_t *plog, const char *errmsg; static struct ap_socache_hints authn_cache_hints = {64, 32, 60000000}; + if (socache_provider == NULL) { + ap_log_perror(APLOG_MARK, APLOG_CRIT, 0, plog, + "Please select a socache provider with AuthnCacheSOCache " + "(no default found on this platform)"); + return 500; /* An HTTP status would be a misnomer! */ + } + rv = ap_global_mutex_create(&authn_cache_mutex, NULL, authn_cache_id, NULL, s, pconf, 0); if (rv != APR_SUCCESS) { |