Allow non-user aliases to map to REMOTE_USER
authorcantor <cantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Tue, 28 Mar 2006 03:27:41 +0000 (03:27 +0000)
committercantor <cantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Tue, 28 Mar 2006 03:27:41 +0000 (03:27 +0000)
git-svn-id: https://svn.middleware.georgetown.edu/cpp-sp/trunk@2004 cb58f699-b61c-0410-a6fe-9272a202ed29

apache/mod_apache.cpp

index b612233..cae4c69 100644 (file)
@@ -768,8 +768,12 @@ bool htAccessControl::authorized(
             }
 
             bool regexp=false;
-            const char* vals=ap_table_get(sta->m_req->headers_in,wrapper->getHeader());
-            while (*t && vals) {
+            const char* vals;
+            if (!strcmp(wrapper->getHeader(),"REMOTE_USER"))
+                vals=remote_user.c_str();
+            else
+                vals=ap_table_get(sta->m_req->headers_in,wrapper->getHeader());
+            while (*t && vals && *vals) {
                 w=ap_getword_conf(sta->m_req->pool,&t);
                 if (*w=='~') {
                     regexp=true;