Run the process as the current Mac OS X user, not as root

I created a Mac OS X helper application that always runs as root. I need to run another application from it, but not as root. I want it to run from the current user (not sudoed root).

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

How can I run the application from the assistant as the current user in Mac OS X?

+6
source share
1 answer

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

+1
source

Source: https://habr.com/ru/post/902014/


All Articles