PDA

View Full Version : Privileges and expiration




LostSoul80
May 12, 2011, 04:31 PM
Hi all,
I need to perform a privileged task after more than 5 minutes within my Cocoa application. I'm using the Security framework to gain the right credentials, but after about 5 minutes they expire - and I don't want the user to write his password again.
Any workaround?

Thanks



kainjow
May 12, 2011, 07:59 PM
An idea off the top of my head is to create your own tool that gets run, sleeps 5 minutes and then executes the real program.

LostSoul80
May 14, 2011, 11:36 AM
Thanks for the reply.
That's pretty much what I did. I created an external tool, and what I do is just running it as a child process with an administrator authentication. Of course it works, though I would have preferred another way to get it.:(

jiminaus
May 14, 2011, 05:57 PM
Thanks for the reply.
That's pretty much what I did. I created an external tool, and what I do is just running it as a child process with an administrator authentication. Of course it works, though I would have preferred another way to get it.:(

Actually helper tools are the preferred mechanism for elevating privileges in Mac OS X, particularly in future versions (but I can't say more of course).