JohnBrighton
JohnBrighton

Reputation: 171

Run application with privileges without helper

I'm currently launching an application with privileges by means of a helper, which is fine. The downside is, at every launch the user is prompted its data.

However, is it possible to assign the application root privileges, with the user's permission to do so?

Upvotes: 0

Views: 362

Answers (1)

Thomas Deniau
Thomas Deniau

Reputation: 2573

No, and you should not do this. If your application runs with root privileges, and it has a security flaw, then your application might become an entry point for a hacker trying to comprise your user's machine.

You should move to a model where the privileged operations are performed by a helper tool and your main application does not have any special privileges.

The Apple sample code is here: https://developer.apple.com/library/mac/#samplecode/SMJobBless/

Upvotes: 1

Related Questions