Re: world writeable files
- From: "Colm Smyth [RU-Ireland]" <colms ireland sun com>
- To: Colm Smyth ireland sun com, hp redhat com
- Cc: drfickle k-lug com, gconf-list gnome org
- Subject: Re: world writeable files
- Date: Mon, 12 Feb 2001 13:15:17 -0800 (PST)
I'd suggest removing the call to umask altogether; it's hard for apps
to do the right thing all the time, that's why it's generally set
from the shell.
If there's no way to tell xmlSaveFile() to use the "ambient" umask,
better pass the current value of umask(), obtained using something
like:
umask(cmask = umask(0)); /* cmask contains the current umask */
Colm.
>X-Authentication-Warning: icon.labs.redhat.com: hp set sender to hp redhat com
using -f
>To: "Colm Smyth [RU-Ireland]" <Colm Smyth ireland sun com>
>Cc: drfickle k-lug com, gconf-list gnome org
>Subject: Re: world writeable files
>From: Havoc Pennington <hp redhat com>
>User-Agent: Gnus/5.0807 (Gnus v5.8.7) Emacs/20.7
>MIME-Version: 1.0
>
>
>"Colm Smyth [RU-Ireland]" <colms ireland sun com> writes:
>> I think there's a call to umask(2) passing zero in gconfd; this should be
>> removed to use the umask set by the user/administrator.
>>
>
>Right, it was a combination of that, plus simply not setting the mode
>explicitly on files created by xmlSaveFile().
>
>I changed it to umask(022). I guess it might be better to not call
>umask() at all. The 022 seems more appropriately paranoid to me; GConf
>takes the permissions it sets explicitly from the mode of the parent
>directory in the XML tree, so if you chmod 777 ~/.gconf the stuff
>inside ~/.gconf will "inherit" that.
>
>Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]