[cpp-sp COMMIT] /branches/REL_2/apache/mod_shib.cpp

noreply at shibboleth.net noreply at shibboleth.net
Wed Oct 17 12:17:00 EDT 2012


Author: scantor
Date: Wed Oct 17 12:17:00 2012
New Revision: 3791

URL: http://svn.shibboleth.net/view/cpp-sp?rev=3791&view=rev
Log:
SSPCPP-502: more deadlock prevention in 2.4 authz hooks

Modified:
    branches/REL_2/apache/mod_shib.cpp

Modified: branches/REL_2/apache/mod_shib.cpp
URL: http://svn.shibboleth.net/view/cpp-sp/branches/REL_2/apache/mod_shib.cpp?rev=3791&r1=3790&r2=3791&view=diff
==============================================================================
--- branches/REL_2/apache/mod_shib.cpp (original)
+++ branches/REL_2/apache/mod_shib.cpp Wed Oct 17 12:17:00 2012
@@ -1585,7 +1585,8 @@
         return sta.second;
 
     try {
-        const Session* session = sta.first->getSession(false);
+        Session* session = sta.first->getSession(false, true, false);
+        Locker slocker(session, false);
         if (session) {
             sta.first->log(SPRequest::SPDebug, "htaccess: accepting valid-user based on active session");
             return AUTHZ_GRANTED;
@@ -1621,7 +1622,8 @@
     const htAccessControl& hta = dynamic_cast<const ApacheRequestMapper*>(sta.first->getRequestSettings().first)->getHTAccessControl();
 
     try {
-        const Session* session = sta.first->getSession(false);
+        Session* session = sta.first->getSession(false, true, false);
+        Locker slocker(session, false);
         if (session && hta.doAuthnContext(*sta.first, session->getAuthnContextClassRef(), require_line) == AccessControl::shib_acl_true)
             return AUTHZ_GRANTED;
         return session ? AUTHZ_DENIED : AUTHZ_DENIED_NO_USER;
@@ -1642,7 +1644,8 @@
     const htAccessControl& hta = dynamic_cast<const ApacheRequestMapper*>(sta.first->getRequestSettings().first)->getHTAccessControl();
 
     try {
-        const Session* session = sta.first->getSession(false);
+        Session* session = sta.first->getSession(false, true, false);
+        Locker slocker(session, false);
         if (session && hta.doAuthnContext(*sta.first, session->getAuthnContextDeclRef(), require_line) == AccessControl::shib_acl_true)
             return AUTHZ_GRANTED;
         return session ? AUTHZ_DENIED : AUTHZ_DENIED_NO_USER;
@@ -1663,7 +1666,8 @@
     const htAccessControl& hta = dynamic_cast<const ApacheRequestMapper*>(sta.first->getRequestSettings().first)->getHTAccessControl();
 
     try {
-        const Session* session = sta.first->getSession(false);
+        Session* session = sta.first->getSession(false, true, false);
+        Locker slocker(session, false);
         if (session) {
             const char* rule = ap_getword_conf(r->pool, &require_line);
             if (rule && hta.doShibAttr(*sta.first, session, rule, require_line) == AccessControl::shib_acl_true)
@@ -1687,7 +1691,8 @@
     const htAccessControl& hta = dynamic_cast<const ApacheRequestMapper*>(sta.first->getRequestSettings().first)->getHTAccessControl();
 
     try {
-        const Session* session = sta.first->getSession(false);
+        Session* session = sta.first->getSession(false, true, false);
+        Locker slocker(session, false);
         if (session) {
             const char* config = ap_getword_conf(r->pool, &require_line);
             if (config && hta.doAccessControl(*sta.first, session, config) == AccessControl::shib_acl_true)



More information about the commits mailing list