Re: [Q] copy operation and authorization

2009-11-13 Thread Dave Keck
> As a user, I would become very suspicious if Finder suddenly requires me to > authorize some copy operation just because I launched an app, or, even > worse, because I took some action within an app... Absolutely - that's the point of the "Details" disclosure triangle in the authorization window

Re: [Q] copy operation and authorization

2009-11-13 Thread Jens Miltner
Am 13.11.2009 um 07:53 schrieb Jerry Krinock: On 2009 Nov 12, at 14:24, Kyle Sluder wrote: No. Do not do this. Follow the pattern of BetterAuthorizationSample: http://developer.apple.com/mac/library/samplecode/BetterAuthorizationSample/listing4.html Yes, what Kyle says is true. AEWP i

Re: [Q] copy operation and authorization

2009-11-12 Thread Jerry Krinock
On 2009 Nov 12, at 14:24, Kyle Sluder wrote: No. Do not do this. Follow the pattern of BetterAuthorizationSample: http://developer.apple.com/mac/library/samplecode/BetterAuthorizationSample/listing4.html Yes, what Kyle says is true. AEWP is not recommended. Now, thought, the *correct* way

Re: [Q] copy operation and authorization

2009-11-12 Thread Kyle Sluder
On Thu, Nov 12, 2009 at 9:44 AM, JongAm Park wrote: > Should I use AuthorizationExecuteWithPrivileges() and invoke an external > command like "cp"? No. Do not do this. Follow the pattern of BetterAuthorizationSample: http://developer.apple.com/mac/library/samplecode/BetterAuthorizationSample/li

Re: [Q] copy operation and authorization

2009-11-12 Thread Nick Zitzmann
On Nov 12, 2009, at 1:17 PM, JongAm Park wrote: > What is interesting was that it didn't require to use PreAuthoriazation flag > when invoking "cp". You don't need to pre-authorize if you're only going to invoke an authorization once; you only need to do that if there is a chance that you need

Re: [Q] copy operation and authorization

2009-11-12 Thread JongAm Park
Thank you all. It works now. What is interesting was that it didn't require to use PreAuthoriazation flag when invoking "cp". I think the "Factored Application" case in the document was about an external program which are not Unix commands but something else. Thank you again. JongAm Park

Re: [Q] copy operation and authorization

2009-11-12 Thread JongAm Park
Thank you. I will try AuthorizationExecuteWithPrivileges(). JongAm Park Nick Zitzmann wrote: On Nov 12, 2009, at 11:34 AM, JongAm Park wrote: You cannot escalate the privileges of a running task on Mac OS X. So if a running task does not have root privileges, then it never will. T

Re: [Q] copy operation and authorization

2009-11-12 Thread Nick Zitzmann
On Nov 12, 2009, at 11:34 AM, JongAm Park wrote: >> You cannot escalate the privileges of a running task on Mac OS X. So if a >> running task does not have root privileges, then it never will. > > Then how? That's what AEWP() is for. Once you've pre-authorized, you pass your authorization ref

Re: [Q] copy operation and authorization

2009-11-12 Thread JongAm Park
Hi, I already took a look at it. It is to use "factored" approach. Thank you. Volker in Lists wrote: Hi, I am using this and I guess it is the recommended way of doing. Works well: http://developer.apple.com/mac/library/samplecode/BetterAuthorizationSample/index.html Volker Am 12.11.20

Re: [Q] copy operation and authorization

2009-11-12 Thread JongAm Park
Nick Zitzmann wrote: On Nov 12, 2009, at 10:44 AM, JongAm Park wrote: NSString *PlugInPath = [NSString stringWithString:@"/Library/Application Support/Final Cut Pro System Support/Plugins/test3.valm"]; Apologies for being a little pedantic here, but calling +stringWithString: is a

Re: [Q] copy operation and authorization

2009-11-12 Thread JongAm Park
I'm sorry, but the scenario doesn't apply to mine. Thank you. Sherm Pendley wrote: On Thu, Nov 12, 2009 at 12:44 PM, JongAm Park wrote: NSString *sourceFile = [NSString stringWithFormat:@"%@/Desktop/test3.valm", NSHomeDirectory()]; Have you tried this? [[NSWorkspace sharedW

Re: [Q] copy operation and authorization

2009-11-12 Thread Sherm Pendley
On Thu, Nov 12, 2009 at 12:44 PM, JongAm Park wrote: > >     NSString *sourceFile = [NSString > stringWithFormat:@"%@/Desktop/test3.valm", NSHomeDirectory()]; Have you tried this? [[NSWorkspace sharedWorkspace] openFile:sourceFile]; Many apps register their plugin extensions as document typ

Re: [Q] copy operation and authorization

2009-11-12 Thread Nick Zitzmann
On Nov 12, 2009, at 10:44 AM, JongAm Park wrote: > NSString *PlugInPath = [NSString stringWithString:@"/Library/Application > Support/Final Cut Pro System Support/Plugins/test3.valm"]; Apologies for being a little pedantic here, but calling +stringWithString: is almost never necessary and in

Re: [Q] copy operation and authorization

2009-11-12 Thread Volker in Lists
Hi, I am using this and I guess it is the recommended way of doing. Works well: http://developer.apple.com/mac/library/samplecode/BetterAuthorizationSample/index.html Volker Am 12.11.2009 um 18:44 schrieb JongAm Park: Hello, I'm trying to copy a file from a desktop to a /Library/Applicati

[Q] copy operation and authorization

2009-11-12 Thread JongAm Park
Hello, I'm trying to copy a file from a desktop to a /Library/Application Supports/../Plugins directory. Because the directory requires to obtain system administrator's privilege I should be authorized. so, I wrote codes like this. - (void)awakeFromNib { [self authorize]; } - (void) appl