]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Fix the file-owner and file-group processing; I inadvertently
authorKen Coar <coar@apache.org>
Fri, 5 Oct 2001 00:53:14 +0000 (00:53 +0000)
committerKen Coar <coar@apache.org>
Fri, 5 Oct 2001 00:53:14 +0000 (00:53 +0000)
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

src/modules/standard/mod_auth.c

index b0a07ccff78f63a0b7d1cf0deabc70cfbb37026a..b45850664dbd52e1dbbaebb54561122f462fce5b 100644 (file)
@@ -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