• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Changing process uid
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Changing process uid


  • Subject: Re: Changing process uid
  • From: Jerry Krinock <email@hidden>
  • Date: Sun, 07 Jan 2007 13:52:24 -0800
  • Thread-topic: Changing process uid

on 07/01/07 11:09, Jonathan Robson at email@hidden wrote:

> 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?

Whoa, if you want the "right" answer, this sounds like a job for a
privileged helper tool as is found and invoked in MoreAuthSample:

http://developer.apple.com/samplecode/Sample_Code/Security/MoreAuthSample.ht
m

The tool in MoreAuthSample changes its uid temporarily to 0 (root), after
requiring an admin password.  I suppose you could modify it to temporarily
use a different uid instead of root, but root will certainly be able to do
it.

The folks on the apple-cdsa mailing list love to give help with
MoreAuthSample.

Warning: I've been advised that it's bad security practice to link the Cocoa
frameworks into a privileged helper tool.  I don't quite understand that.
But there are people on apple-cdsa that do.


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Changing process uid (From: Jonathan Robson <email@hidden>)

  • Prev by Date: Re: Replacing values in NSDictionary
  • Next by Date: Re: Speed problems using NSImage. Solution?
  • Previous by thread: Changing process uid
  • Next by thread: Figuring out if we have an active gateway
  • Index(es):
    • Date
    • Thread