FROM : Jeff Disher
DATE : Thu Nov 07 20:36:02 2002
Actually, the "open" program seems to always run as the use who owns
the loginwindow process. The hint given for Mach-O bundles is correct
but you can't use open to launch as root. You can use LaunchCFMApp
(/System/Library/Frameworks/Carbon.framework/Versions/Current/Support/
LaunchCFMApp) but for some reason you can't execute this directly with
the Security framework or it will also launch processes as the user
that owns loginwindow. The only way I know of to launch a CFM app as
root is by invoking LaunchCFMApp with sudo (it is beyond me why this
works with sudo and not with the security framework) and then feeding
the password to the sudo process manually.
It is for this reason, that my "Skeleton Key" program hasn't been able
to launch Carbon apps since the security update last october. I am
hoping that I am overlooking something that would make this easier. If
anyone has a better way to launch Carbon apps as root, can you post
that since I am also very interested in that.
Thanks,
Jeff.
On Thursday, November 7, 2002, at 10:56 PM, Nick Zitzmann wrote:
>
> On Thursday, November 7, 2002, at 03:25 PM, <email_removed> wrote:
>
>> I have a GUI app that needs to run as a system user every time it is
>> launched. What I was doing was writing a wrapper app around it which
>> would do a little hacky piping of the password into a sudo prompt
>> which would launch the app as root. But I know that a security
>> update disabled doing that. So my question is, is there a way to use
>> the Security Framework to launch another application as root?
>
> The answer is yes. If this application you want to launch is in Mach-O
> format, then you'd just have the security framework launch
> /Path/To/Your/Application.app/Contents/MacOS/Application.
>
> If this application is in CFM format, then you'll have to make your
> program run the "open" command and pass the path to the application as
> an argument.
>
> Nick Zitzmann
> AIM/iChat: dragonsdontsleep
> Check out my software page: http://dreamless.home.attbi.com/
>
> "La la la! I sing, too! For food, for food! La la la!" - Gabo, Dragon
> Warrior VII
>
> _______________________________________________
> MacOSX-dev mailing list
> <email_removed>
> http://www.omnigroup.com/mailman/listinfo/macosx-dev
>
>
Jeff Disher
President and Lead Developer of Spectral Class
Spectral Class: Shedding Light on Innovation
http://www.spectralclass.com/
DATE : Thu Nov 07 20:36:02 2002
Actually, the "open" program seems to always run as the use who owns
the loginwindow process. The hint given for Mach-O bundles is correct
but you can't use open to launch as root. You can use LaunchCFMApp
(/System/Library/Frameworks/Carbon.framework/Versions/Current/Support/
LaunchCFMApp) but for some reason you can't execute this directly with
the Security framework or it will also launch processes as the user
that owns loginwindow. The only way I know of to launch a CFM app as
root is by invoking LaunchCFMApp with sudo (it is beyond me why this
works with sudo and not with the security framework) and then feeding
the password to the sudo process manually.
It is for this reason, that my "Skeleton Key" program hasn't been able
to launch Carbon apps since the security update last october. I am
hoping that I am overlooking something that would make this easier. If
anyone has a better way to launch Carbon apps as root, can you post
that since I am also very interested in that.
Thanks,
Jeff.
On Thursday, November 7, 2002, at 10:56 PM, Nick Zitzmann wrote:
>
> On Thursday, November 7, 2002, at 03:25 PM, <email_removed> wrote:
>
>> I have a GUI app that needs to run as a system user every time it is
>> launched. What I was doing was writing a wrapper app around it which
>> would do a little hacky piping of the password into a sudo prompt
>> which would launch the app as root. But I know that a security
>> update disabled doing that. So my question is, is there a way to use
>> the Security Framework to launch another application as root?
>
> The answer is yes. If this application you want to launch is in Mach-O
> format, then you'd just have the security framework launch
> /Path/To/Your/Application.app/Contents/MacOS/Application.
>
> If this application is in CFM format, then you'll have to make your
> program run the "open" command and pass the path to the application as
> an argument.
>
> Nick Zitzmann
> AIM/iChat: dragonsdontsleep
> Check out my software page: http://dreamless.home.attbi.com/
>
> "La la la! I sing, too! For food, for food! La la la!" - Gabo, Dragon
> Warrior VII
>
> _______________________________________________
> MacOSX-dev mailing list
> <email_removed>
> http://www.omnigroup.com/mailman/listinfo/macosx-dev
>
>
Jeff Disher
President and Lead Developer of Spectral Class
Spectral Class: Shedding Light on Innovation
http://www.spectralclass.com/
| Related mails | Author | Date |
|---|---|---|
| fahrenba | Nov 7, 15:26 | |
| Nick Zitzmann | Nov 7, 19:57 | |
| Jeff Disher | Nov 7, 20:36 |






Cocoa mail archive

