From: Bradley Nicholes Date: Fri, 30 Dec 2005 00:09:38 +0000 (+0000) Subject: Add 'granted' and 'denied' arguments to the authz 'all' provider to try to mimic... X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aa1358ed3e90376256418353e35aab089189ff09;p=thirdparty%2Fapache%2Fhttpd.git Add 'granted' and 'denied' arguments to the authz 'all' provider to try to mimic the previous 'allow from all' and 'deny from all' functionality git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/authz-dev@359936 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/aaa/mod_authz_host.c b/modules/aaa/mod_authz_host.c index f6f07b98459..d428cc9dd5e 100644 --- a/modules/aaa/mod_authz_host.c +++ b/modules/aaa/mod_authz_host.c @@ -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 =