You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by bn...@apache.org on 2005/12/30 01:09:40 UTC

svn commit: r359936 - /httpd/httpd/branches/authz-dev/modules/aaa/mod_authz_host.c

Author: bnicholes
Date: Thu Dec 29 16:09:38 2005
New Revision: 359936

URL: http://svn.apache.org/viewcvs?rev=359936&view=rev
Log:
Add 'granted' and 'denied' arguments to the authz 'all' provider to try to mimic the previous 'allow from all' and 'deny from all' functionality

Modified:
    httpd/httpd/branches/authz-dev/modules/aaa/mod_authz_host.c

Modified: httpd/httpd/branches/authz-dev/modules/aaa/mod_authz_host.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/branches/authz-dev/modules/aaa/mod_authz_host.c?rev=359936&r1=359935&r2=359936&view=diff
==============================================================================
--- httpd/httpd/branches/authz-dev/modules/aaa/mod_authz_host.c (original)
+++ httpd/httpd/branches/authz-dev/modules/aaa/mod_authz_host.c Thu Dec 29 16:09:38 2005
@@ -444,9 +444,15 @@
 
 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 =