| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
Got it: SCDynamicStoreCopyConsoleUser(). Works great, no need to fork().
Can you fork() and then call setuid() in the child process to become the desired user?
I should try that. Do you have a quick hint on how to find out who the desired user (i.e. the logged-in user) is? Also, why would I need to fork(), wouldn't it be enough to just call setuid()?
Thanks, Frederik
I am not sure whether accessing a user keychain works from within a process started outside of a graphic login session in 10.2. Maybe Perry will read this and comment. :-)
-ken
On Dec 19, 2004, at 5:28 AM, Frederik Seiffert wrote:
Hi,
I have a command-line application running completely as root (i.e. both uid and euid are 0), from which I need to find a password in the keychain of the currently logged-in user (in case of Fast User Switching, the currently 'active' user should be taken).
The function SecKeychainSetPreferenceDomain with a domain of kSecPreferencesDomainUser seems to be what I'm looking for, but unfortunately the application needs to run on 10.2 and this function is only available in 10.3 and later.
Is there a way to accomplish this on Mac OS X 10.2?
Thanks! Frederik
_______________________________________________ Do not post admin requests to the list. They will be ignored. Apple-cdsa mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/apple-cdsa/email@hidden
| References: | |
| >Re: Getting user keychain as root (From: Frederik Seiffert <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.