• 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: Andrew Pinski <email@hidden>
  • Date: Mon, 5 Nov 2001 20:02:55 -0500

It is the effective uid (geteuid and seteuid), at least that is what I think you also have
to call [NSUserDefaults ???], I don't remember the name of the function: check the
archives again it is there because it was sent out today.

Thanks,
Andrew Pinski
On Monday, November 5, 2001, at 07:51 , Julien Jalon wrote:

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
_______________________________________________
cocoa-dev mailing list
email@hidden
http://www.lists.apple.com/mailman/listinfo/cocoa-dev


References: 
 >Re: NSUsersDefault and users (From: Julien Jalon <email@hidden>)

  • Prev by Date: Re: NSUsersDefault and users
  • Next by Date: Re: Bug in Interface Builder concerning Drawers at the Bottom
  • Previous by thread: Re: NSUsersDefault and users
  • Next by thread: Re: NSUsersDefault and users
  • Index(es):
    • Date
    • Thread