site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=CS2jvenpwYqX1K67G3oosFmrzOija7mvQ1wLWhprNFBHmjs+4iF+4Pa4Lud+0qCjUlYrvH6sV/r+k4fLRS2FrXoqlnDXtn5+R9MKFdVBOI1mng5+ehZt4J0fyp8RqV1t9OKmdxVyIgm2tTr8rIYAD5eBcqUrtuSbQxa3zbD5QEM= 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 (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... 2007/1/7, Jonathan Robson <jonathan@robson-gb.com>: This email sent to site_archiver@lists.apple.com
participants (1)
-
stephen joseph butler