Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting user keychain as root




Can you fork() and then call setuid() in the child process to become the desired user?


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

This email sent to email@hidden


_______________________________________________ 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

This email sent to email@hidden
References: 
 >Getting user keychain as root (From: Frederik Seiffert <email@hidden>)



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.