Re: Authorization Services

2014-04-27 Thread Jerry Krinock
On 2014 Apr 26, at 12:56, Eric Smith wrote: > Can someone post a code snippet that shows how to us authorization services > to run 'sudo chown' This article has a little sample code near the bottom, but you should read the whole thing. https://developer.apple.com/library/m

Authorization Services

2014-04-26 Thread Eric Smith
All, New to Authorization, and it's got me a little turned around. Can someone post a code snippet that shows how to us authorization services to run 'sudo chown' from within Cocoa? Thanks in advance! Eric ___ Cocoa-dev mailing

Re: authorization services

2009-09-15 Thread Greg Guerin
Mark Thomas wrote: This I cannot check the pid of the initiating process as it's 'AuthorizationExecuteWithPrivileges' which has launched this process and given it extra privileges somehow, as the below path to the tool is passed in via the 'cmd' argument, so it's the direct tool which bei

Re: authorization services

2009-09-15 Thread Mark Thomas
Hi > wait() only works if there's a direct child process. Other relationships (e.g. grandparentage) don't count. Seems fair and matches the documentation > I recommend that your privileged tool log its getppid() value and you manually compare to the getpid() value of the > initiating pro

Re: authorization services

2009-09-15 Thread Greg Guerin
Mark Thomas wrote: I notice from the NSLog's outputs that this code doesn't seem to be waiting for that launched tool to finish, as I have also put some NSLogs within the tool itself, as I do not see NSLog's timestamps match up, as I would expect to see the timestamp of the above 'tool ha

Re: authorization services

2009-09-15 Thread Mark Thomas
Hi All, Thanks for the replies, however I'm noticing from the snippet below FILE* commsPipe = NULL; DEBUG_SHOW(CFStringCreateWithFormat(kCFAllocatorDefault, NULL, CFSTR("Call external Tool (%s) withs Args(%s)."), cmd, pArguments) ); err = (WirelessError)AuthorizationExecuteWithPrivileges([au

Re: authorization services

2009-09-14 Thread Nick Zitzmann
On Sep 14, 2009, at 1:57 PM, Mark Thomas wrote: I was wondering if anybody could tell me if it's correct to use authorizationExecuteWithPrivileges and wait() calls together, so the parent process wait's until that new child process finishes. Googling seems to imply this from the examples I

Re: authorization services

2009-09-14 Thread Todd Heberlein
On Sep 14, 2009, at 12:57 PM, Mark Thomas wrote: I was wondering if anybody could tell me if it's correct to use authorizationExecuteWithPrivileges and wait() calls together, so the parent process wait's until that new child process finishes. Googling seems to imply this from the examples

authorization services

2009-09-14 Thread Mark Thomas
Hi ALL, I was wondering if anybody could tell me if it's correct to use authorizationExecuteWithPrivileges and wait() calls together, so the parent process wait's until that new child process finishes. Googling seems to imply this from the examples I've seen. However reading the documentat

Re: authorization services

2009-08-24 Thread Rick C.
ok thank you both it's most helpful! rick From: Jean-Daniel Dupas To: Rick C. Cc: cocoa dev Sent: Tuesday, August 25, 2009 1:35:45 AM Subject: Re: authorization services Le 24 août 2009 à 18:35, Kyle Sluder a écrit : > On Mon, Aug 24, 2009 at

Re: authorization services

2009-08-24 Thread Jean-Daniel Dupas
Le 24 août 2009 à 18:35, Kyle Sluder a écrit : On Mon, Aug 24, 2009 at 6:10 AM, Rick C. wrote: if i can follow up please about authorization services i just want to be sure i'm on the right track. if i'm just trying to do a simple movePath but i don't have access is the

Re: authorization services

2009-08-24 Thread Kyle Sluder
On Mon, Aug 24, 2009 at 6:10 AM, Rick C. wrote: > if i can follow up please about authorization services i just want to be sure > i'm on the right track.  if i'm just trying to do a simple movePath but i > don't have access is the only wa

Re: authorization services

2009-08-24 Thread Rick C.
hi again, if i can follow up please about authorization services i just want to be sure i'm on the right track. if i'm just trying to do a simple movePath but i don't have access is the only way to get access by using authorizationExecuteWithPrivileges? i keep reading abo

Re: authorization services

2009-08-24 Thread Rick C.
thank you kyle, i've been carefully reading over authorization services since i posted and looks like i'm getting there. i definitely want to make sure i do this the right way and thanks again for your help! rick From: Kyle Sluder To: Rick C.

Re: authorization services

2009-08-23 Thread Kyle Sluder
Avoid using NSTask with Authorization Services in any pattern other than that illustrated in the documentation. Using AppleScript for this sounds like severe overkill. And shelling out to a script is not a good idea when filenames or special characters are involved. Learn and use

authorization services

2009-08-23 Thread Rick C.
hello, what i need for my project is a simple authorization from time to time if for example a file is being moved and i don't have access. i'm just starting to learn about authorization services and maybe this is what i need to do although it looks a bit complex for my needs. w