]> git.saurik.com Git - apple/security.git/blob - Security/sec/securityd/SecLogSettingsServer.c
Security-57031.40.6.tar.gz
[apple/security.git] / Security / sec / securityd / SecLogSettingsServer.c
1 //
2 // SecLogSettingsServer.c
3 // sec
4 //
5 //
6
7 #include <securityd/SecLogSettingsServer.h>
8 #include <Security/SecBase.h>
9 #include <Security/SecLogging.h>
10 #include <utilities/debugging.h>
11 #include <utilities/SecCFWrappers.h>
12 #include <utilities/SecCFError.h>
13
14 CFPropertyListRef
15 SecCopyLogSettings_Server(CFErrorRef* error)
16 {
17 return CopyCurrentScopePlist();
18 }
19
20 bool
21 SecSetXPCLogSettings_Server(CFTypeRef type, CFErrorRef* error)
22 {
23 bool success = false;
24 if (isString(type)) {
25 ApplyScopeListForID(type, kScopeIDXPC);
26 success = true;
27 } else if (isDictionary(type)) {
28 ApplyScopeDictionaryForID(type, kScopeIDXPC);
29 success = true;
30 } else {
31 success = SecError(errSecParam, error, CFSTR("Unsupported CFType"));
32 }
33
34 return success;
35 }