You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by sterling <st...@covalent.net> on 2001/08/06 22:05:56 UTC

[PATCH] http error messages misleading when all auth handlers return DECLINED

Hi all -

When no auth handlers are willing to handle a  request, you get an
internal error (which is correct) and a log message  which says 'No User
File?' or 'No Group File?'.  This can be very  misleading (especially if
you don't have mod_auth enabled :).  I suggest a  more accurate message is
printed - (e.g. the patch below) Feel free to change the wording :)


sterling


Index: modules/http/http_request.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/modules/http/http_request.c,v
retrieving revision 1.105
diff -u -r1.105 http_request.c
--- modules/http/http_request.c	2001/08/06 19:13:02	1.105
+++ modules/http/http_request.c	2001/08/06 19:45:17
@@ -316,14 +316,14 @@
         if (ap_some_auth_required(r)) {
             if (((access_status = ap_run_check_user_id(r)) != 0) || !ap_auth_type(r)) {
                 decl_die(access_status, ap_auth_type(r)
-		    ? "check user.  No user file?"
-		    : "perform authentication. AuthType not set!", r);
+                         ? "check user.  No authentication handler."
+                         : "perform authentication. AuthType not set!", r);
                 return;
             }
             if (((access_status = ap_run_auth_checker(r)) != 0) || !ap_auth_type(r)) {
                 decl_die(access_status, ap_auth_type(r)
-		    ? "check access.  No groups file?"
-		    : "perform authentication. AuthType not set!", r);
+                         ? "check auth.  No authorization handler."
+                         : "perform authentication. AuthType not set!", r);
                 return;
             }
         }
@@ -338,14 +338,14 @@
             }
             if (((access_status = ap_run_check_user_id(r)) != 0) || !ap_auth_type(r)) {
                 decl_die(access_status, ap_auth_type(r)
-		    ? "check user.  No user file?"
-		    : "perform authentication. AuthType not set!", r);
+                         ? "check user.  No authentication handler."
+                         : "perform authentication. AuthType not set!", r);
                 return;
             }
             if (((access_status = ap_run_auth_checker(r)) != 0) || !ap_auth_type(r)) {
                 decl_die(access_status, ap_auth_type(r)
-		    ? "check access.  No groups file?"
-		    : "perform authentication. AuthType not set!", r);
+                         ? "check auth.  No authorization handler."
+                         : "perform authentication. AuthType not set!", r);
                 return;
             }
         }