]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
backport r667513
authorJim Jagielski <jim@apache.org>
Sat, 14 Jun 2008 11:44:19 +0000 (11:44 +0000)
committerJim Jagielski <jim@apache.org>
Sat, 14 Jun 2008 11:44:19 +0000 (11:44 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@667776 13f79535-47bb-0310-9956-ffa450edef68

STATUS
modules/aaa/mod_authz_host.c

diff --git a/STATUS b/STATUS
index 1b2612eb051045ac139511444d5193938eb6a8fc..90fa20e2a8de66081d38362f6c54130816a489e1 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -83,13 +83,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
- * mod_authz_host: Also allow for negation of env-var (env=!)
-   for allow/deny criteria.
-   Trunk version of patch:
-         http://svn.apache.org/viewvc?view=rev&revision=667513
-   Backport version for 2.2.x of patch:
-         http://people.apache.org/~jim/patches/nenv-mod_authz_host.txt
-   +1: jim, rpluem, niq
 
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
   [ New proposals should be added at the end of the list ]
index a502951c00d8b3e8a97eb6e33feaf0b6cda0226c..f23288f54d368d76e3d7d860e4ad8936ae23b03d 100644 (file)
@@ -42,6 +42,7 @@
 
 enum allowdeny_type {
     T_ENV,
+    T_NENV,
     T_ALL,
     T_IP,
     T_HOST,
@@ -123,7 +124,12 @@ static const char *allow_cmd(cmd_parms *cmd, void *dv, const char *from,
     a->x.from = where;
     a->limited = cmd->limited;
 
-    if (!strncasecmp(where, "env=", 4)) {
+    if (!strncasecmp(where, "env=!", 5)) {
+        a->type = T_NENV;
+        a->x.from += 5;
+
+    }
+    else if (!strncasecmp(where, "env=", 4)) {
         a->type = T_ENV;
         a->x.from += 4;
 
@@ -220,6 +226,12 @@ static int find_allowdeny(request_rec *r, apr_array_header_t *a, int method)
             }
             break;
 
+        case T_NENV:
+            if (!apr_table_get(r->subprocess_env, ap[i].x.from)) {
+                return 1;
+            }
+            break;
+
         case T_ALL:
             return 1;