]> git.saurik.com Git - apple/security.git/blobdiff - securityd/securityd_service/KeyStore/KeyStoreEvents.c
Security-59306.61.1.tar.gz
[apple/security.git] / securityd / securityd_service / KeyStore / KeyStoreEvents.c
index 63a749d57967da80370602d1630f5856028bf17c..a64addcc7b9b19840e4fddcf90625285041fbc88 100644 (file)
@@ -9,14 +9,15 @@
 #include <IOKit/IOKitLib.h>
 #include <Kernel/IOKit/crypto/AppleKeyStoreDefs.h>
 #include <xpc/event_private.h>
 #include <IOKit/IOKitLib.h>
 #include <Kernel/IOKit/crypto/AppleKeyStoreDefs.h>
 #include <xpc/event_private.h>
+#include <os/log.h>
 
 static void aksNotificationCallback(void *refcon,io_service_t service, natural_t messageType, void *messageArgument)
 {
        if(messageType == kAppleKeyStoreLockStateChangeMessage) {
 
 static void aksNotificationCallback(void *refcon,io_service_t service, natural_t messageType, void *messageArgument)
 {
        if(messageType == kAppleKeyStoreLockStateChangeMessage) {
-//        syslog(LOG_ERR, "KeyStoreNotifier - %s posting notification: %s\n", __func__, kAppleKeyStoreLockStatusNotificationID);
+        os_log(OS_LOG_DEFAULT, "KeyStoreNotifier posting lockstate change");
                notify_post(kAppleKeyStoreLockStatusNotificationID);
        } else if (messageType == kAppleKeyStoreFirstUnlockMessage) {
                notify_post(kAppleKeyStoreLockStatusNotificationID);
        } else if (messageType == kAppleKeyStoreFirstUnlockMessage) {
-//        syslog(LOG_ERR, "KeyStoreNotifier - %s posting notification: %s\n", __func__, kAppleKeyStoreFirstUnlockNotificationID);
+        os_log(OS_LOG_DEFAULT, "KeyStoreNotifier posting first unlock");
                notify_post(kAppleKeyStoreFirstUnlockNotificationID);
     }
 }
                notify_post(kAppleKeyStoreFirstUnlockNotificationID);
     }
 }
@@ -25,7 +26,7 @@ static void start(dispatch_queue_t queue)
 {
        IOReturn result;
        io_service_t aksService = IO_OBJECT_NULL;
 {
        IOReturn result;
        io_service_t aksService = IO_OBJECT_NULL;
-       IONotificationPortRef aksNotifyPort = IO_OBJECT_NULL;
+       IONotificationPortRef aksNotifyPort = NULL;
        io_object_t notification = IO_OBJECT_NULL;
 
        aksService = IOServiceGetMatchingService(kIOMasterPortDefault, IOServiceMatching(kAppleKeyStoreServiceName));
        io_object_t notification = IO_OBJECT_NULL;
 
        aksService = IOServiceGetMatchingService(kIOMasterPortDefault, IOServiceMatching(kAppleKeyStoreServiceName));