Skip navigation.
 
mlread stderr with AuthorizationExecuteWithPrivileges
FROM : Jérôme Paschoud
DATE : Mon Jan 07 22:16:31 2008

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Everybody,

I'm desperately trying to find a way to read the stderr output when 
using the function AuthorizationExecuteWithPrivileges(). I'm, as far 
as I can tell, obliged to use this function as I want to build  GUI 
front end to ipfw. ipfw needs to be run with administrator privileges 
that's why I can't use an NSTask.

During the insertion rule process ipfw provide a convient check method 
by prefixing your add command with -n. If the rule is not well formed 
you get a description of the error in the stderr. It would be highly 
desirable for my front end to be able to capture this output and to 
display it such that the user knows why his rule wasn't accepted.

I read a lot about Authorization on the list (from the very old 
BLAuthentication to the Apple code sample "BetterAuthorizationSample") 
but didn't find any satisfying method. The only example that I found 
(but unfortunately truncated to the half) seemed to write the stderr 
to a file and then read from that file.

If someone does have any idea on how to read the stderr, I would be 
more than happy to hear it.

CU Jerome
- - --
Paschoud Jerome
Ingénieur Informaticien (ing. info. dipl. EPFL)
http://www.spikesoft.ch
PGP key: http://www.spikesoft.ch/jpaschoud/JeromePaschoud.asc
PGP fingerprint: 9193 403D D9C1 0512 4ECC  AE9C 81F3 4F2A 0A15 F629





-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)

iD8DBQFHgpavgfNPKgoV9ikRAjigAJ43bI6rCHiot8GtkGIPvIM6hbynbACeMGPz
xZ4BIjmCzdFKIP4F2bMtIDs=
=OleO
-----END PGP SIGNATURE-----

Related mailsAuthorDate
mlread stderr with AuthorizationExecuteWithPrivileges Jérôme Paschoud Jan 7, 22:16
mlRe: read stderr with AuthorizationExecuteWithPrivileges Alastair Houghton Jan 8, 13:19