• 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: Sandboxing. WTF?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sandboxing. WTF?


  • Subject: Re: Sandboxing. WTF?
  • From: Jean-Daniel Dupas <email@hidden>
  • Date: Mon, 28 May 2012 10:54:14 +0200

Le 28 mai 2012 à 07:18, Graham Cox a écrit :

>
> On 28/05/2012, at 3:10 PM, Marco S Hyman wrote:
>
>> I think that is your issue.
>
>
> What is the issue?
>
> I have read that, several times. It states:
>
> "With these provisos in mind, you can use a path-based temporary exception entitlement to gain programmatic access to the user’s ~/Library/Preferences folder. Use a read-only entitlement to avoid opening the user’s preferences to malicious exploitation."
>
> Well, that's what I am doing as I pointed out in my last message. But I still am unable to read the particular pref I need. (I have filed a radar asking that this feature be made available officially as well, but it's certainly a dupe).
>
>
> --Graham
>


That's because you're not trying yo read ~/Library/Preferences/com.apple.iApps.plist but you are trying to read a preference file in your sandboxed application container.

You just can't access file in ~/Library/Preferences using the CFPreferences API, as all calls to CFPreferences will be automagically redirected to you application container preferences folder instead.

The posted documentation says:

«A POSIX function, such as getpwuid, can provide the file system path you need.»

I guess it means you have to resolve the real com.apple.iApps.plist path yourself and access the file directly.


-- Jean-Daniel





_______________________________________________

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: Sandboxing. WTF?
      • From: Graham Cox <email@hidden>
References: 
 >Sandboxing. WTF? (From: Graham Cox <email@hidden>)
 >Re: Sandboxing. WTF? (From: Fritz Anderson <email@hidden>)
 >Re: Sandboxing. WTF? (From: Graham Cox <email@hidden>)
 >Re: Sandboxing. WTF? (From: Quincey Morris <email@hidden>)
 >Re: Sandboxing. WTF? (From: Graham Cox <email@hidden>)
 >Re: Sandboxing. WTF? (From: Marco S Hyman <email@hidden>)
 >Re: Sandboxing. WTF? (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: Sandboxing. WTF?
  • Next by Date: Re: Sandboxing. WTF?
  • Previous by thread: Re: Sandboxing. WTF?
  • Next by thread: Re: Sandboxing. WTF?
  • Index(es):
    • Date
    • Thread