7

I have created a Mac OS X helper application that always runs under root. I need to launch other application from it, but not as root. I want it to be launched from the current logged in user (not sudoed root).

I've tried to use [NSTask launchedTaskWithLaunchPath:arguments:] and many other methods, but they all use root privileges to launch my application.

How can I launch my application from helper as a current Mac OS X logged in user?

Daniel O'Hara
  • 13,307
  • 3
  • 46
  • 68

1 Answers1

1

It looks like the Authorization Services Programming Guide might help you.

dar512
  • 862
  • 8
  • 18
  • 2
    Please be more specific. What part of it directly addresses the question? – Peter Hosey Nov 21 '11 at 19:53
  • In unix, I think you'd want to set the euid for the process, so I did a search for Mac and euid. There's a section in there **Calling a Helper Tool as Root** that talks about running a sub-process as root. I don't know if it goes the other way, but it's a place to start. – dar512 Nov 22 '11 at 14:46