• 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
read stderr with AuthorizationExecuteWithPrivileges
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

read stderr with AuthorizationExecuteWithPrivileges


  • Subject: read stderr with AuthorizationExecuteWithPrivileges
  • From: Jérôme Paschoud <email@hidden>
  • Date: Mon, 7 Jan 2008 22:16:31 +0100

-----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-----
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: read stderr with AuthorizationExecuteWithPrivileges
      • From: Alastair Houghton <email@hidden>
  • Prev by Date: Re: Circular initialization of controllers in NIB file
  • Next by Date: Re: Mouse tracking in CALayer
  • Previous by thread: Re: Core Data: case insensitive "equals" predicate strings!?
  • Next by thread: Re: read stderr with AuthorizationExecuteWithPrivileges
  • Index(es):
    • Date
    • Thread