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

Re: NSUsersDefault and users


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

Le mardi 6 novembre 2001, ` 01:30 AM, Julien Jalon a icrit :

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).



I finally thought it was a problem in the environment vars so I tested.
Effectively the USER and HOME env vars are the one from the user and not root!

So I just forced the daemon at the beggining of the main() proc to change HOME to /var/root and USER to root but it does nothing. :-/

--Julien


  • Follow-Ups:
    • Re: NSUsersDefault and users
      • From: Andrew Pinski <email@hidden>
References: 
 >NSUsersDefault and users (From: Julien Jalon <email@hidden>)

  • Prev by Date: NSUsersDefault and users
  • Next by Date: Re: NSUsersDefault and users
  • Previous by thread: NSUsersDefault and users
  • Next by thread: Re: NSUsersDefault and users
  • Index(es):
    • Date
    • Thread