I use AuthorizationShell - I think authored by Thomas Templemann - very successfully over the past couple years. I use it to run a HelperApp to run as root inside my bundle. It calls some reading and writing functions that need root permissions. When I start my app, the user gets the standard authentication Mac dialog and enters their password, so the helper app runs as root.
So now I’m trying to to run the “dd” command off a Shell object inside that helper app. I would think the user shouldn’t have to put in their password again, right?
If I do (for example) “dd if=disk.dmg of=/dev/disk4” I get Permission denied for /dev/disk4. If I do “sudo dd if=disk.dmg of=/dev/disk4” I get "sudo: no tty present and no askpass program specified’. I googled and got a couple ideas but I don’t see how they’d work with the AuthorizationShell.