AuthorizationExecuteWithPrivileges
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