diff options
Diffstat (limited to 'modules/aaa/mod_authn_file.c')
-rw-r--r-- | modules/aaa/mod_authn_file.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/modules/aaa/mod_authn_file.c b/modules/aaa/mod_authn_file.c index 018733e1..f3b2b9db 100644 --- a/modules/aaa/mod_authn_file.c +++ b/modules/aaa/mod_authn_file.c @@ -70,6 +70,12 @@ static authn_status check_password(request_rec *r, const char *user, apr_status_t status; char *file_password = NULL; + if (!conf->pwfile) { + ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, + "AuthUserFile not specified in the configuration"); + return AUTH_GENERAL_ERROR; + } + status = ap_pcfg_openfile(&f, r->pool, conf->pwfile); if (status != APR_SUCCESS) { @@ -118,6 +124,12 @@ static authn_status get_realm_hash(request_rec *r, const char *user, apr_status_t status; char *file_hash = NULL; + if (!conf->pwfile) { + ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, + "AuthUserFile not specified in the configuration"); + return AUTH_GENERAL_ERROR; + } + status = ap_pcfg_openfile(&f, r->pool, conf->pwfile); if (status != APR_SUCCESS) { |