3

For example, my app uses the following command with the OS handling a pop up alert to request the admin password to authenticate as root. Is there an entitlement that will allow me run this from within the sandbox ?

    @IBAction func clearFonts(sender: NSButton) {

    NSAppleScript(source: "do shell script \"sudo atsutil databases -remove;sudo atsutil server -shutdown\" with administrator " +
        "privileges")!.executeAndReturnError(nil)

}
tsh79
  • 69
  • 4
  • 1
    Answer is: you can't do that if the app is sandboxed, arbitrary script execution is forbidden by the sandbox. No `sudo` allowed. – Eric Aya May 05 '15 at 09:02

1 Answers1

0

you can't do that if the app is sandboxed, arbitrary script execution is forbidden by the sandbox. No sudo allowed.

mahal tertin
  • 3,239
  • 24
  • 41