Adding a keychain to the list of searchable ones in an atomic way
Adding a keychain to the list of searchable ones in an atomic way
- Subject: Adding a keychain to the list of searchable ones in an atomic way
- From: Jerome Lacoste <email@hidden>
- Date: Tue, 16 Dec 2014 11:16:04 +0100
Hello,
To modify the searchable keychains list I end up doing something like
LIST=`security list-keychains -d user | cut -d '"' -f 2 | sort -u`
security list-keychains -s other_keychain $LIST
This isn't atomic and could always fail at some point if 2 scripts
where running at the same time and we would end up losing one keychain
because of command reordering.
It seems like it would have been more safe to have an atomic API such as:
security list-keychains -add other_keychain
security list-keychains -remove other_keychain
Or am I missing something ?
Thanks,
Jerome
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden