From: Ken Coar Date: Fri, 5 Oct 2001 00:53:14 +0000 (+0000) Subject: Fix the file-owner and file-group processing; I inadvertently X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f35ddbb1afbdd43384ecd4dd879d1077070d7f25;p=thirdparty%2Fapache%2Fhttpd.git Fix the file-owner and file-group processing; I inadvertently added them as 'and' operations, so if they were specified but not matched, nothing else could match either. Fixed.. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@91297 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/modules/standard/mod_auth.c b/src/modules/standard/mod_auth.c index b0a07ccff78..b45850664db 100644 --- a/src/modules/standard/mod_auth.c +++ b/src/modules/standard/mod_auth.c @@ -279,9 +279,10 @@ static int check_user_access(request_rec *r) */ if (strcmp(w, "file-owner") == 0) { #if defined(WIN32) || defined(NETWARE) || defined(OS2) - ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r, - "'Require file-user' not supported on this platform"); - return HTTP_UNAUTHORIZED; + ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, r, + "'Require file-user' not supported " + "on this platform, ignored"); + continue; #else struct passwd *pwent; ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_DEBUG, r, @@ -307,32 +308,33 @@ static int check_user_access(request_rec *r) return OK; } else { - return HTTP_UNAUTHORIZED; + continue; } } #endif } if (strcmp(w, "file-group") == 0) { #if defined(WIN32) || defined(NETWARE) || defined(OS2) - ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r, - "'Require file-group' not supported on this platform"); - return HTTP_UNAUTHORIZED; + ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, r, + "'Require file-group' not supported " + "on this platform, ignored"); + continue; #else struct group *grent; if (sec->auth_grpfile == NULL) { - ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_WARNING, r, + ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, r, "no AuthGroupFile, so 'file-group' " - "requirement fails for file '%s'", + "requirement cannot succeed for file '%s'", r->filename); - return HTTP_UNAUTHORIZED; + continue; } if (grpstatus == NULL) { ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_WARNING, r, "authenticated user '%s' not a member of " "any groups, so 'file-group' requirement " - "fails for file '%s'", + "cannot succeed for file '%s'", user, r->filename); - return HTTP_UNAUTHORIZED; + continue; } ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_DEBUG, r, "checking for 'group' access for file '%s'", @@ -357,7 +359,7 @@ static int check_user_access(request_rec *r) return OK; } else { - return HTTP_UNAUTHORIZED; + continue; } } #endif