]> git.saurik.com Git - apple/security.git/blobdiff - securityd/src/session.cpp
Security-59306.61.1.tar.gz
[apple/security.git] / securityd / src / session.cpp
index 75990e12684ea730a7d2d24b2843f83841b084db..69fbf6a61d4106698dd1714f3d86c504960da1fa 100644 (file)
@@ -95,7 +95,6 @@ Server &Session::server() const
        return parent<Server>();
 }
 
        return parent<Server>();
 }
 
-
 //
 // Locate a session object by session identifier
 //
 //
 // Locate a session object by session identifier
 //
@@ -245,16 +244,22 @@ void Session::invalidateSessionAuthHosts()
     StLock<Mutex> _(mAuthHostLock);
     
     // if you got here, we don't care about pending operations: the auth hosts die
     StLock<Mutex> _(mAuthHostLock);
     
     // if you got here, we don't care about pending operations: the auth hosts die
-    Syslog::warning("Killing auth hosts");
-    if (mSecurityAgent) mSecurityAgent->UnixPlusPlus::Child::kill(SIGTERM);
+    Syslog::warning("Killing auth hosts for session %d", this->sessionId());
+    if (mSecurityAgent) {
+        secnotice("shutdown", "SIGTERMing child in state %d, pid %d", mSecurityAgent->UnixPlusPlus::Child::state(), mSecurityAgent->UnixPlusPlus::Child::pid());
+        mSecurityAgent->UnixPlusPlus::Child::kill(SIGTERM);
+    } else {
+        secnotice("shutdown", "No securityagent for session %d", this->sessionId());
+    }
     mSecurityAgent = NULL;
 }
 
 void Session::invalidateAuthHosts()
 {
        StLock<Mutex> _(mSessionLock);
     mSecurityAgent = NULL;
 }
 
 void Session::invalidateAuthHosts()
 {
        StLock<Mutex> _(mSessionLock);
-       for (SessionMap::const_iterator it = mSessions.begin(); it != mSessions.end(); it++)
+    for (SessionMap::const_iterator it = mSessions.begin(); it != mSessions.end(); it++) {
         it->second->invalidateSessionAuthHosts();
         it->second->invalidateSessionAuthHosts();
+    }
 }
 
 //
 }
 
 //