]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Add 'granted' and 'denied' arguments to the authz 'all' provider to try to mimic...
authorBradley Nicholes <bnicholes@apache.org>
Fri, 30 Dec 2005 00:09:38 +0000 (00:09 +0000)
committerBradley Nicholes <bnicholes@apache.org>
Fri, 30 Dec 2005 00:09:38 +0000 (00:09 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/authz-dev@359936 13f79535-47bb-0310-9956-ffa450edef68

modules/aaa/mod_authz_host.c

index f6f07b98459909460dd547fd0ab507e19cef0428..d428cc9dd5ecfa339229edd3c5b9f96b359d5d5d 100644 (file)
@@ -444,9 +444,15 @@ static authz_status host_check_authorization(request_rec *r, const char *require
 
 static authz_status all_check_authorization(request_rec *r, const char *require_line)
 {
-    /* Just let everybody in. This is basically here for backward consistency since
-        this 'all' provider is the same as the 'valid-user' provider. */
-    return AUTHZ_GRANTED;
+    /* If the argument to the 'all' provider is 'granted' then just let 
+        everybody in. This would be equivalent to the previous syntax of
+        'allow from all'. If the argument is anything else, this would
+        be equivalent to 'deny from all' Of course the opposite would be 
+        true if the 'all' provider is invoked by the 'reject' directive */
+    if (strcasecmp(require_line, "granted") == 0) {
+        return AUTHZ_GRANTED;
+    }
+    return AUTHZ_DENIED;
 }
 
 static const authz_provider authz_env_provider =