Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

LostSoul80

macrumors 68020
Original poster
Jan 25, 2009
2,136
7
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
 
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.
 
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.:(
 
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).
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.