You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ji...@apache.org on 2008/06/13 15:02:09 UTC
svn commit: r667513 - /httpd/httpd/trunk/modules/aaa/mod_access_compat.c
Author: jim
Date: Fri Jun 13 06:02:09 2008
New Revision: 667513
URL: http://svn.apache.org/viewvc?rev=667513&view=rev
Log:
Allow for negation of env check as well...
Modified:
httpd/httpd/trunk/modules/aaa/mod_access_compat.c
Modified: httpd/httpd/trunk/modules/aaa/mod_access_compat.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/aaa/mod_access_compat.c?rev=667513&r1=667512&r2=667513&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/aaa/mod_access_compat.c (original)
+++ httpd/httpd/trunk/modules/aaa/mod_access_compat.c Fri Jun 13 06:02:09 2008
@@ -45,6 +45,7 @@
enum allowdeny_type {
T_ENV,
+ T_NENV,
T_ALL,
T_IP,
T_HOST,
@@ -156,7 +157,12 @@
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;
@@ -255,6 +261,12 @@
}
break;
+ case T_NENV:
+ if (!apr_table_get(r->subprocess_env, ap[i].x.from)) {
+ return 1;
+ }
+ break;
+
case T_ALL:
return 1;