Re: Reading data from the pipe in AuthorizationExecuteWithPrivileges() ??
Re: Reading data from the pipe in AuthorizationExecuteWithPrivileges() ??
- Subject: Re: Reading data from the pipe in AuthorizationExecuteWithPrivileges() ??
- From: Mark Williams <email@hidden>
- Date: Tue, 4 Oct 2005 20:38:43 -0700
Well this doesn't seem to make a difference either. I'm still getting
nothing in the dittoOut file. I tried doing /bin/sh. But isn't that
against apple's security? I mean to execute a shell and then a
command in it? I'm thinking it must be in the way I'm trying to read
the the output.
Thanks for the help though
Mark.
On Oct 4, 2005, at 7:09 PM, Sherm Pendley wrote:
On Oct 4, 2005, at 8:34 PM, Mark Williams wrote:
i never use fopen because I thought I wasn't suppose to. And
according to the man page ditto writes all it's data to stderr
when you use the "-V" argument, which is one of the arguments I am
passing to the tool.
That's the problem then. From the description of this function
found in the Authorization Services reference:
communicationsPipe
A pointer to a file structure. The Security Server creates the
file, opens it for reading and writing, and connects it to the
tool’s standard input and output.
Note - standard input & output, not stderr.
A workaround might be to execute /bin/sh instead of ditto, passing
the ditto command as an argument using sh's -c option. You could
then use the usual shell construct to redirect ditto's stderr to
its stdout: "2>&1".
sherm--
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org
_______________________________________________
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