Re: Get root privileges with NSTask

2008-03-25 Thread Jean-Daniel Dupas
Apparently you neither listen what other people says, nor read basic info on technologie you are using, else you would have note that settings the MAGICK_HOME environment variable is enough to install ImageMagick in an other location. (took me less than 2 minutes to find this info on the

Re: Get root privileges with NSTask

2008-03-25 Thread Clark Cox
On Tue, Mar 25, 2008 at 10:58 AM, Mr. Gecko <[EMAIL PROTECTED]> wrote: > how about this code? If you're not going to listen to any of the answers that you get, why do you bother asking? -- Clark S. Cox III [EMAIL PROTECTED] ___ Cocoa-dev mailing list

Re: Get root privileges with NSTask

2008-03-25 Thread Mr. Gecko
how about this code? NSTask* download = [[NSTask alloc] init]; [download setLaunchPath:@"/usr/bin/curl"]; [download setCurrentDirectoryPath:@"/tmp/"]; [download setArguments: [NSArray arrayWithObjects:@"-O",@"http://www.imagemagick.org/download/binaries/ImageMagick-universal-apple-darwin8.11.0.tar

Re: Get root privileges with NSTask

2008-03-25 Thread Jens Alfke
Sorry for a 2nd reply but I just looked at what ImageMagick is. If your app uses this library, you don't need to (and shouldn't) install it at the root of the OS. Instead, put the shared library into your application bundle. That way your app doesn't need authorization, doesn't alter the OS

Re: Get root privileges with NSTask

2008-03-25 Thread Jens Alfke
This is REALLY not the right way to be doing this. I'm not talking about what auth mechanism to use; I'm talking about what you should be doing as root. I speak as someone who might download and use your program someday. (a) Most of what you're doing can be done in Cocoa without having to

Re: Get root privileges with NSTask

2008-03-25 Thread Clark Cox
You don't seem to be listening. You were given the correct answer: use AuthorizationServices: Please read, and understand, this page: On Tue, Mar 25, 2008 at 7:47 AM, Mr.

Re: Get root privileges with NSTask

2008-03-25 Thread Mr. Gecko
I guess I will use applescript for this task On Mar 25, 2008, at 8:19 AM, Jean-Daniel Dupas wrote: If you didn't find anything useful in the Chris Hanson post and in the link it provides, I'm not sure we can give you more help. NSTask cannot launch an executable with more privilege than you

Re: Get root privileges with NSTask

2008-03-25 Thread Jean-Daniel Dupas
If you didn't find anything useful in the Chris Hanson post and in the link it provides, I'm not sure we can give you more help. NSTask cannot launch an executable with more privilege than your current task (except if it launches a setuid tool), and previous responses already give you eve

Re: Get root privileges with NSTask

2008-03-25 Thread Mr. Gecko
I looked around there and found nothing useful. Here is my code that I am tying to get root privileges with. NSTask* download = [[NSTask alloc] init]; [download setLaunchPath:@"/usr/bin/curl"]; [download setCurrentDirectoryPath:@"/"]; [download setArguments: [NSArray arrayWithObjects:@"-O",@"http:

Re: Get root privileges with NSTask

2008-03-24 Thread Michael Watson
Search the list. This comes up often. When I say "it comes up often", I mean "this gets asked so often that it actually was talked about yesterday". Chris Hanson posted this: (1) Use Authorization Services to cr

Re: Get root privileges with NSTask

2008-03-24 Thread Nick Zitzmann
On Mar 24, 2008, at 9:07 PM, Mr. Gecko wrote: Hello I am needing to get root privileges with NSTask so my program can install some items that will get downloaded from the internet with curl is that possible I know I can do that with applescript. No. You can execute tasks with root privileg