]> git.saurik.com Git - apple/security.git/blobdiff - OSX/libsecurityd/lib/ssclient.cpp
Security-58286.20.16.tar.gz
[apple/security.git] / OSX / libsecurityd / lib / ssclient.cpp
index 379510048703e86d5a455735e982bb21bf76c22b..76853a35f620d8936d9dc56455d1b871d332baa8 100644 (file)
@@ -79,7 +79,7 @@ void ClientSession::activate()
        // (that has not exec'ed), our apparent connection to SecurityServer
        // is just a mirage, and we better reset it.
        if (mHasForked()) {
        // (that has not exec'ed), our apparent connection to SecurityServer
        // is just a mirage, and we better reset it.
        if (mHasForked()) {
-               secdebug("SSclnt", "process has forked (now pid=%d) - resetting connection object", getpid());
+               secinfo("SSclnt", "process has forked (now pid=%d) - resetting connection object", getpid());
                mGlobal.reset();
        }
                
                mGlobal.reset();
        }
                
@@ -90,18 +90,17 @@ void ClientSession::activate()
                // first time for this thread - use abbreviated registration
                IPCN(ucsp_client_setupThread(UCSP_ARGS, mach_task_self()));
         thread.registered = true;
                // first time for this thread - use abbreviated registration
                IPCN(ucsp_client_setupThread(UCSP_ARGS, mach_task_self()));
         thread.registered = true;
-        secdebug("SSclnt", "Thread registered with %s", mContactName);
+        secinfo("SSclnt", "Thread registered with %s", mContactName);
        }
        
        // if the thread's guest state has changed, tell securityd
        if (thread.currentGuest != thread.lastGuest) {
                IPCN(ucsp_client_setGuest(UCSP_ARGS, thread.currentGuest, kSecCSDefaultFlags));
                thread.lastGuest = thread.currentGuest;
        }
        
        // if the thread's guest state has changed, tell securityd
        if (thread.currentGuest != thread.lastGuest) {
                IPCN(ucsp_client_setGuest(UCSP_ARGS, thread.currentGuest, kSecCSDefaultFlags));
                thread.lastGuest = thread.currentGuest;
-               secdebug("SSclnt", "switched guest state to 0x%x", thread.currentGuest);
+               secinfo("SSclnt", "switched guest state to 0x%x", thread.currentGuest);
        }
 }
 
        }
 }
 
-
 //
 // The contactName method allows the caller to explicitly override the bootstrap
 // name under which SecurityServer is located. Use this only with great caution,
 //
 // The contactName method allows the caller to explicitly override the bootstrap
 // name under which SecurityServer is located. Use this only with great caution,
@@ -131,7 +130,7 @@ ClientSession::Global::Global()
        serverPort = findSecurityd();
     
        mach_port_t originPort = MACH_PORT_NULL;
        serverPort = findSecurityd();
     
        mach_port_t originPort = MACH_PORT_NULL;
-       IPCN(ucsp_client_verifyPrivileged2(serverPort.port(), mig_get_reply_port(), &securitydCreds, &rcode, &originPort));
+       IPCBASIC(ucsp_client_verifyPrivileged2(serverPort.port(), mig_get_reply_port(), &securitydCreds, &rcode, &originPort));
        if (originPort != serverPort.port())
                CssmError::throwMe(CSSM_ERRCODE_VERIFICATION_FAILURE);
        mach_port_mod_refs(mach_task_self(), originPort, MACH_PORT_RIGHT_SEND, -1);
        if (originPort != serverPort.port())
                CssmError::throwMe(CSSM_ERRCODE_VERIFICATION_FAILURE);
        mach_port_mod_refs(mach_task_self(), originPort, MACH_PORT_RIGHT_SEND, -1);
@@ -143,11 +142,11 @@ ClientSession::Global::Global()
     // cannot use UCSP_ARGS here because it uses mGlobal() -> deadlock
     Thread &thread = this->thread();
        
     // cannot use UCSP_ARGS here because it uses mGlobal() -> deadlock
     Thread &thread = this->thread();
        
-       IPCN(ucsp_client_setup(serverPort, thread.replyPort, &securitydCreds, &rcode,
+       IPCBASIC(ucsp_client_setup(serverPort, thread.replyPort, &securitydCreds, &rcode,
                mach_task_self(), info, extForm));
     thread.registered = true;  // as a side-effect of setup call above
        IFDEBUG(serverPort.requestNotify(thread.replyPort));
                mach_task_self(), info, extForm));
     thread.registered = true;  // as a side-effect of setup call above
        IFDEBUG(serverPort.requestNotify(thread.replyPort));
-       secdebug("SSclnt", "contact with %s established", mContactName);
+       secinfo("SSclnt", "contact with %s established", mContactName);
 }
 
 
 }
 
 
@@ -160,7 +159,7 @@ ClientSession::Global::Global()
 //
 void ClientSession::reset()
 {
 //
 void ClientSession::reset()
 {
-       secdebug("SSclnt", "resetting client state (OUCH)");
+       secinfo("SSclnt", "resetting client state (OUCH)");
        mGlobal.reset();
 }
 
        mGlobal.reset();
 }
 
@@ -179,9 +178,9 @@ Port ClientSession::findSecurityd()
                        mContactName = SECURITYSERVER_BOOTSTRAP_NAME;
        }
 
                        mContactName = SECURITYSERVER_BOOTSTRAP_NAME;
        }
 
-    secdebug("SSclnt", "Locating %s", mContactName);
+    secinfo("SSclnt", "Locating %s", mContactName);
     Port serverPort = Bootstrap().lookup2(mContactName);
     Port serverPort = Bootstrap().lookup2(mContactName);
-       secdebug("SSclnt", "contacting %s at port %d (version %d)",
+       secinfo("SSclnt", "contacting %s at port %d (version %d)",
                mContactName, serverPort.port(), SSPROTOVERSION);
        return serverPort;
 }
                mContactName, serverPort.port(), SSPROTOVERSION);
        return serverPort;
 }
@@ -211,10 +210,10 @@ void ClientSession::childCheckIn(Port serverPort, Port taskPort)
 void ClientSession::notifyAclChange(KeyHandle key, CSSM_ACL_AUTHORIZATION_TAG tag)
 {
        if (mCallback) {
 void ClientSession::notifyAclChange(KeyHandle key, CSSM_ACL_AUTHORIZATION_TAG tag)
 {
        if (mCallback) {
-               secdebug("keyacl", "ACL change key %u operation %u", key, tag);
+               secinfo("keyacl", "ACL change key %u operation %u", key, tag);
                mCallback(mCallbackContext, *this, key, tag);
        } else
                mCallback(mCallbackContext, *this, key, tag);
        } else
-               secdebug("keyacl", "dropped ACL change notice for key %u operation %u",
+               secinfo("keyacl", "dropped ACL change notice for key %u operation %u",
                        key, tag);
 }
 
                        key, tag);
 }