Stdout Reading from an Asynchronous Task started with AuthorizationExecuteWithPrivileges
Stdout Reading from an Asynchronous Task started with AuthorizationExecuteWithPrivileges
- Subject: Stdout Reading from an Asynchronous Task started with AuthorizationExecuteWithPrivileges
- From: email@hidden
- Date: Fri, 28 Nov 2003 01:03:18 -0500
I have called AuthorizationExecuteWithPrivileges and have passed a FILE
pointer as the optional fifth argument as shown:
err = AuthorizationExecuteWithPrivileges(authorizationRef,
[pathToCommand cString], 0, NULL, &communicationsPipe);
Is it possible to handle this pipe as a NSFileHandle by doing the
following:
fileHandle = [[NSFileHandle alloc] initWithFileDescriptor:fileno
(communicationsPipe) closeOnDealloc:YES];
It seems to work, but I can't get it to output when I try to
readInBackgroundAndNotify. Does anyone have any suggestions or sample
code for asynchronous reading of the pipe returned from
AuthorizationExecuteWithPrivileges.
Even better, does anyone have an object for running authenticated tasks
like NSTask. BLAuthentication is great and all, but it does use shared
instances. =)
Thanks in advance,
Matt
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.