]>
git.saurik.com Git - apple/security.git/blob - SecurityServer/StartupItems/SecurityServer
5 # we could make this optional, but the system depends on SecurityServer A LOT...
7 ConsoleMessage
"Starting SecurityServer"
9 export DEBUGDEST
=LOG_AUTHPRIV
10 #export DEBUGOPTIONS=thread,scope # only useful with
11 #export DEBUGSCOPE=-mutex # debug-enabled SecurityServers
12 /System
/Library
/CoreServices
/SecurityServer
-X
14 if [ ! -f /Library
/Keychains
/System.keychain
-a -x /usr
/sbin
/systemkeychain
]; then
15 # no system keychain; make one
16 ConsoleMessage
"Creating System Keychain"
17 if [ ! -d /Library
/Keychains
]; then
18 mkdir -p /Library
/Keychains
19 chown root.admin
/Library
/Keychains
20 chmod 755 /Library
/Keychains
# do NOT make this 775 -- Security!
22 sleep 2 # give SecurityServer a chance to come up
23 /usr
/sbin
/systemkeychain
-C
24 touch /Library
/Keychains
/.fixed
26 elif [ ! -f /Library
/Keychains
/.fixed
-a -x /usr
/sbin
/systemkeychain
]; then
27 # temporary fix: replace broken (early) system keychains (missing db schema)
29 rm -f /Library
/Keychains
/System.keychain
30 /usr
/sbin
/systemkeychain
-C
31 touch /Library
/Keychains
/.fixed