summaryrefslogtreecommitdiff
path: root/modules/aaa/mod_authn_file.c
diff options
context:
space:
mode:
authorStefan Fritsch <sf@sfritsch.de>2011-12-27 19:43:09 +0100
committerStefan Fritsch <sf@sfritsch.de>2011-12-27 19:43:09 +0100
commit5b56d06a01a150fc9685e6f913774be3f9deb49f (patch)
tree9fbfbe0313b782941f1c2c4d3cb5203817144108 /modules/aaa/mod_authn_file.c
parent498ea95018b369e62646a98c7d7d5413b56e170c (diff)
downloadapache2-upstream/2.2.19.tar.gz
Upstream tarball 2.2.19upstream/2.2.19
Diffstat (limited to 'modules/aaa/mod_authn_file.c')
-rw-r--r--modules/aaa/mod_authn_file.c12
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) {