Blame httpd-2.2.0-authnoprov.patch
|
|
bc53791 |
--- httpd-2.2.0/modules/aaa/mod_authn_file.c.authnoprov
|
|
|
bc53791 |
+++ httpd-2.2.0/modules/aaa/mod_authn_file.c
|
|
|
bc53791 |
@@ -70,6 +70,10 @@
|
|
|
bc53791 |
apr_status_t status;
|
|
|
bc53791 |
char *file_password = NULL;
|
|
|
bc53791 |
|
|
|
bc53791 |
+ if (!conf->pwfile) {
|
|
|
bc53791 |
+ return AUTH_GENERAL_ERROR;
|
|
|
bc53791 |
+ }
|
|
|
bc53791 |
+
|
|
|
bc53791 |
status = ap_pcfg_openfile(&f, r->pool, conf->pwfile);
|
|
|
bc53791 |
|
|
|
bc53791 |
if (status != APR_SUCCESS) {
|
|
|
bc53791 |
--- httpd-2.2.0/modules/aaa/mod_auth_basic.c.authnoprov
|
|
|
bc53791 |
+++ httpd-2.2.0/modules/aaa/mod_auth_basic.c
|
|
|
bc53791 |
@@ -252,6 +252,14 @@
|
|
|
bc53791 |
return DECLINED;
|
|
|
bc53791 |
}
|
|
|
bc53791 |
|
|
|
bc53791 |
+ /* If no providers were configured, and the default file
|
|
|
bc53791 |
+ * provider gave a general error (which will happen only if
|
|
|
bc53791 |
+ * has not been configured), presume that a non-provider-based
|
|
|
bc53791 |
+ * authn module is configured, and get out of the way. */
|
|
|
bc53791 |
+ if (!conf->providers && auth_result == AUTH_GENERAL_ERROR) {
|
|
|
bc53791 |
+ return DECLINED;
|
|
|
bc53791 |
+ }
|
|
|
bc53791 |
+
|
|
|
bc53791 |
switch (auth_result) {
|
|
|
bc53791 |
case AUTH_DENIED:
|
|
|
bc53791 |
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
|