• 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
Communicate with pipe and AuthorizationExecuteWithPrivileges
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Communicate with pipe and AuthorizationExecuteWithPrivileges


  • Subject: Communicate with pipe and AuthorizationExecuteWithPrivileges
  • From: Jorge Salvador Caffarena <email@hidden>
  • Date: Mon, 25 Jun 2001 18:10:22 +0200

Here I am again with a question about AuthorizationExecuteWithPrivileges. The only documentation I have found on this function is on its header file, and it is short and not very helpfull sometimes.

I want to get the output of the tool I execute with AuthorizationExecuteWithPrivileges, but when I use a FILE * handler, after trying to read from it my app enter some kind of deadlock and the Beachball Of Death appears. Here is the code:

err = AuthorizationExecuteWithPrivileges(authorizationRef,
"/sbin/shutdown",0,args,&output);

fread(buffer,1,4096,output);
NSLog(@"%s\n",buffer);

The variable "output" is of type "FILE *" and the NSLog do not execute, what am I doing wrong?

Thanks in advance,

Jorge Salvador Caffarena
http://homepage.mac.com/eevyl/


  • Follow-Ups:
    • Re: Communicate with pipe and AuthorizationExecuteWithPrivileges
      • From: "Sven A. Schmidt" <email@hidden>
  • Prev by Date: tableViewValidateDrop not getting called
  • Next by Date: Re: Calling Cocoa from C
  • Previous by thread: tableViewValidateDrop not getting called
  • Next by thread: Re: Communicate with pipe and AuthorizationExecuteWithPrivileges
  • Index(es):
    • Date
    • Thread