• 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
Re: Authorization.h
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Authorization.h


  • Subject: Re: Authorization.h
  • From: Stéphane Sudre <email@hidden>
  • Date: Tue, 6 Nov 2001 11:54:14 +0100

On mardi, novembre 6, 2001, at 10:20 , Josh M. Hurd wrote:

So I was able to get Authorization working easily. Very clever how the Authenticate panel warns you that your Caps Lock is down. I haven't been so lucky with getting my worker tool to communicate with my main app.

My main app needs to be able to operate on a list of files as root. It already does this with non-root files so all the code and data structures are in place. My data is in an NSArray and I would like to send it to my root privileged tool as such to avoid code changes. I have read through tons of doc pages and pieced together snippets of sample code but can't get it to work. Neither one is willing to respond to the other. I am attempting to make connections with NSConnection and communicate through a proxy using NSProxy. Is this even close?

Does anyone know of a good tutorial or some sample code that illustrates how to so this? I've checked various site, including Apple but haven't found any that helped.

You can do what Julien is explaining to you: use NSNotification and more precisely its userInfo NSDictionary data to transmit your NSArray.

Another solution is to use a CFMessagePort to communicate between both applications. You may need to convert your array before sending it through a CFDataRef but it's not that complex.

Another solution is to write your array to a file in /tmp/user_id/ and send a notification to your privileged tool that the data is available. You can do this via a NSNotification again.

A good example is available in /Developer/Examples/CoreFoundation : Notification Observer / Poster .


  • Follow-Ups:
    • Re: Authorization.h
      • From: Julien Jalon <email@hidden>
    • Re: Authorization.h
      • From: "John C. Randolph" <email@hidden>
References: 
 >Re: Authorization.h (From: "Josh M. Hurd" <email@hidden>)

  • Prev by Date: Re: Matrix of TableViews
  • Next by Date: Re: Authorization.h
  • Previous by thread: Re: Authorization.h
  • Next by thread: Re: Authorization.h
  • Index(es):
    • Date
    • Thread