• 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
NSUsersDefault and users
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSUsersDefault and users


  • Subject: NSUsersDefault and users
  • From: Julien Jalon <email@hidden>
  • Date: Tue, 6 Nov 2001 01:30:08 +0100

I was trying something with my application (DNSUpdate) and found a problem with the user identification by the FoundationKit while playing with User defaults... I think the problem is also the cause of some other problems I have.

Let me explain:
DNSUpdate launch a daemon as root (using the SecurityFramework).

the daemon register and use some defaults but... the defaults plist file is stored in the user preferences folder (the one who launched DNSUpdate).

Since the daemon is launched as root, the plist file normally has to be stored in the root preferences folder. The daemon acts as if it was launched by the user (Except it has root priviledges...).

My question: how to be sure the daemon acts as if it was launched at boot time and so acts as a program launched by root? (e.g. [NSUserDefaults standardUserDefaults] points to the defaults file in the root preferences folder!)

(I know that I can use the -initWithUser: method of NSUserDefaults as a workaround but I don't want that... I want my tool to behave as expected).

--Julien Jalon

PS: As a side question, how to make [NSUserDefaults standardUserDefaults] point to /Library/Preferences instead of ~root/Library/Preferences?


  • Follow-Ups:
    • Re: NSUsersDefault and users
      • From: Chris Parker <email@hidden>
    • Re: NSUsersDefault and users
      • From: Chris Parker <email@hidden>
    • Re: NSUsersDefault and users
      • From: Julien Jalon <email@hidden>
  • Prev by Date: Re: AppleDouble format
  • Next by Date: Re: NSUsersDefault and users
  • Previous by thread: Where are the AuthorizationRights listed?
  • Next by thread: Re: NSUsersDefault and users
  • Index(es):
    • Date
    • Thread