/Library/Preferences Writable By Everyone
/Library/Preferences Writable By Everyone
- Subject: /Library/Preferences Writable By Everyone
- From: "Ken J." <email@hidden>
- Date: Sun, 20 Sep 2009 03:00:27 -0700
Hello all, this is a question regarding to the permission set on
/Library/Preferences in Leopard.
I ran this code as a non-admin user: (I am strict to myself to not use
admin accounts other then installs/updates.)
CFPreferencesSetValue(keyName, valueString, appID,
kCFPreferencesAnyUser, kCFPreferencesCurrentHost);
BOOL success = CFPreferencesSynchronize(appID,
kCFPreferencesAnyUser,
kCFPreferencesCurrentHost);
if (success) NSLog(@"Preferences synchronized.");
The result:
2009-09-20 02:11:16.002 aups[1945:10b] Preferences synchronized.
What I was trying to do was to save a global parameter for my app that
is only modifiable by Admin rights. However, this was just a
proof-of-concept process and have not ran any code as Admin just yet.
I did a lot of research and was confident that this would NOT write
the plist file since it requires an Admin-user for an AnyUser domain.
But it is now in the /Library/Preferences as "com.example.test.plist"
and is the case with all the non-admin account I tried on my Leopard
iMac.
So I checked the folder permission to find out it's:
drwxrwxrwx 67 root admin 2278 Sep 20 02:35 Preferences
I ran repair permissions but that did not change anything.
Can anyone confirm this is in fact the default permission and the
CFPreferences utilities behave such?
Or is this a known bug?
Thanks.
--
Ken
_______________________________________________
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