Am 23.09.2012 um 22:49 schrieb Garth Hjelte <[email protected]>:

> #!/bin/sh
> chmod 777 /Applications/Chicken\ Systems/Translator\ 6/Translator\ 6\ 
> Edition.app/Contents/MacOS/HelperApp.app

Please go to terminal and read stuff displayed if you type command "man chmod" 
and press return.

>>> If it's to the app file itself, do I just do a chmod 777 myapp.app to it, 
>>> either the user does it himself or I run a script from PackageMaker (yes, I 
>>> use Packagemaker).
>> chmod 777 does not need. you may need to set setuid and make the app non 
>> writable by everyone.
> 
> I did some research and am even more confused. I don't know how to "set 
> setuid", I kind of know what it is but didn't find any docs on how to do it.

Above man page shows it.

> 1) Run my app
> 2) My app starts the helper app (when it's first needed I suppose)
> 3) It creates a AuthorizeMBS object
> 4) I run a series of commands with that object; that blesses the app to be 
> root for it's lifetime.
> 5) Work commences, all is well
> 6) My app terminates the helper app, my app quits
> 7) Wake up the next morning and start with 1) again

Looks okay. XPC from Apple would automate it and make it App Store compatible.

> I'm sorry I'm so dense, but is this how to bless an app to run as root? 

In my apps I run a shell script to do it.

> I also checked this out, but as you know, it's all XCode and not REAL. I 
> could look at the code, and probably will end up doing so. Actually, I'd love 
> to have the helperapp done in C++ anyway, since my privileged routines are in 
> C++ right now anyway (in a dylib called from my REAL app). So my C++ dylib 
> would call the C++ helperapp, REAL may not even be involved.

Well, if you go so deep, you need to read docs from Apple a lot.
It's not an easy task.

Greetings
Christian

-- 
Read our blog about news on our plugins:

http://www.mbsplugins.de/

_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
[email protected]
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Reply via email to