• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
AuthorizationExecuteWithPrivileges
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AuthorizationExecuteWithPrivileges


  • Subject: AuthorizationExecuteWithPrivileges
  • From: Linea Tessile Srl <email@hidden>
  • Date: Fri, 17 Sep 2004 12:37:27 +0200

Is there some sort of inherent limit on the number of times you can call AuthorizationExecuteWithPrivileges()?

On my machine it always returns error -60031 (errAuthorizationToolExecuteFailure) on iteration 20.

Please refer to the attached code fragment.

OSStatus err = 0;
AuthorizationRef authorizationRef;
char *authArgs[4];

err = AuthorizationCreate(&rights,
kAuthorizationEmptyEnvironment,
kAuthorizationFlagDefaults,
&authorizationRef);

while(1)
{
authArgs[0] = "-R";
authArgs[1] = (char*)[owner cString];
authArgs[2] = (char*)[path cString];
authArgs[3] = NULL;


err = AuthorizationExecuteWithPrivileges(authorizationRef,

"/usr/sbin/chown",

0, authArgs, NULL);



0)
{
NSBeep();
NSLog(@"Error %d in AuthorizationExecuteWithPrivileges",err);
}


Best regards ,

Alessandra
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: RE: Width of NSSegmentedControl[SOLVED]
  • Next by Date: Re: Zerolink as a default option
  • Previous by thread: RE: Width of NSSegmentedControl[SOLVED]
  • Next by thread: OpenGL accumulator issue
  • Index(es):
    • Date
    • Thread