In article
<9e734c7c-9d01-4e15-8d7e-d204cdee1bd7@[EMAIL PROTECTED]
>,
p2 <pradip.patel@[EMAIL PROTECTED]
> wrote:
> > Your options are:
> > a) Only save this change when running as an admin user; if the synch
> > fails, fall back to user-local storage.
> > b) Write someplace else, essentially recreating a ****tion of the
> > CFPreferences API.
> > c) Use some form of privilege escalation like a single-purpose setuid
> > tool running as root to save this setting.
> >
> > I advocate course (a) unless it's critical that this value be
identical
> > for all users. (b) and (c) both have shortcomings that are beyond the
> > scope of this message - the increased complexity in comparison to (a)
is
> > probably the least of your worries.
>
> Hi
>
> I cann't get..it's like to save for individual user.
>
> But I want to save from admin as well as from nonadmin..
> Can you please tell me which is the common access path for all users
> to save and update preferences ?
>
> please look because it work for 10.4 and not for 10.5
I still say it's working for 10.4 because you're not running in the
environment you think you are.
I also still say (a) is the best course unless your program really
*needs* that preference value to be universal. Frankly, I can only think
of a couple of situations where that's the case, and almost all of those
can be handled at installation time.
The only location that it guaranteed to be world-writable on a Mac OS X
system is /Users/Shared. The biggest problem is that the closest we have
to guidelines for writing there is "don't." This can kind of be inferred
by the lack of a domain constant referencing it, and there are very
strong feelings in some quarters about software blindly writing to that
directory.
If (a) isn't viable for you, the correct option is (c). But it's also
the most difficult. Look at the do***entation and sample code for the
Authorization API.
--
"Harry?" Ron's voice was a mere whisper. "Do you smell something ...
burning?"
- Harry Potter and the Odor of the Phoenix


|