Re: Changing process uid
Re: Changing process uid
- Subject: Re: Changing process uid
- From: "stephen joseph butler" <email@hidden>
- Date: Sun, 7 Jan 2007 13:53:48 -0600
2007/1/7, Jonathan Robson <email@hidden>:
Hi There,
I am trying to add an addressbook entry to another users addressbook,
I read that if you change the uid before calling [ABAddressBook
sharedAddressBook] you could gain access to the persons addressbook.
How can I change uid programatically in order to administer their
addressbook?
You need to write a factored application. See...
Introduction to Performing Privileged Operations With Authorization Services:
<http://developer.apple.com/documentation/Security/Conceptual/authorization_concepts/index.html?http://developer.apple.com/documentation/Security/Conceptual/authorization_concepts/01introduction/chapter_1_section_1.html#//apple_ref/doc/uid/TP30000995-CH204-DontLinkElementID_1>
Specifically, Authorizing in a Factored Application:
<http://developer.apple.com/documentation/Security/Conceptual/authorization_concepts/03authtasks/chapter_3_section_3.html#//apple_ref/doc/uid/TP30000995-CH206-BCIGAIAG>
I've personally use parts of the MoreIsBetter code
(MoreSecurity/MoreUNIX/MoreCFQ):
<http://developer.apple.com/samplecode/MoreIsBetter/>
After you understand all that, it's as simple as calling setuid( <uid
to switch to> ) from a root setuid helper tool.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden