<rdar://problem/7354303> Potential deadlock between mDNSResponder(Helper) & Directory...
authorrlpm@apple.com <rlpm@apple.com@214c2c4a-bf3b-4dcf-9390-e4dd3010487d>
Sat, 31 Oct 2009 02:27:09 +0000 (02:27 +0000)
committerrlpm@apple.com <rlpm@apple.com@214c2c4a-bf3b-4dcf-9390-e4dd3010487d>
Sat, 31 Oct 2009 02:27:09 +0000 (02:27 +0000)
Don't make unnecessary call when not in debug mode.

git-svn-id: http://svn.macosforge.org/repository/mDNSResponder/trunk@6765 214c2c4a-bf3b-4dcf-9390-e4dd3010487d

mDNSMacOSX/helper-main.c

index e74ed8d..5783582 100644 (file)
@@ -289,7 +289,7 @@ int main(int ac, char *av[])
 #ifndef NO_SECURITYFRAMEWORK
        // We should normally be running as a system daemon.  However, that might not be the case in some scenarios (e.g. debugging).
        // Explicitly ensure that our Keychain operations utilize the system domain.
-       SecKeychainSetPreferenceDomain(kSecPreferencesDomainSystem);
+       if (opt_debug) SecKeychainSetPreferenceDomain(kSecPreferencesDomainSystem);
 #endif
        gPort = checkin(kmDNSHelperServiceName);
        if (!gPort)