At 12:29 PM 9/23/2012, you wrote:

>You can do that with installer (E.g. Package Maker).

So given this:

MyApp.app
   Contents
      MacOS
         MyApp
         HelperApp.app
            Contents
               MacOS
                  HelperApp
      Frameworks
      Resources

I would write a shell script and run it in Packagemaker, like this:

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

>>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.

>>If it's in AuthorizeMBS, again, is that for the running time of the app or is 
>>it to the function scope itself? 

>You bless app to run as root.

So is it this?

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

But using AuthorizeMBS I'm not clear on. Is it:

Auth = New AuthorizationMBS 
If Auth.SimpleNewAuthorization Then 
   Auth.SimpleAuthorize 
   If Auth.Authorized then 
      return
   End If
End If
Quit

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

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.

Sorry to be so confusing.

http://atnan.com/blog/2012/02/29/modern-privileged-helper-tools-using-smjobbless-plus-xpc/
  

Garth Hjelte
Sampler User

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

Reply via email to