'dconf update' changes permissions if umask is set
@mkasik
Submitted by Marek Kašík Assigned to dco..@..e.bugs
Link to original bug (#758066)
Description
Created attachment 315420 Restore permissions on changed files
Hi,
I've got downstream report which says that when 'dconf update' is called after umask has been changed to e.g. 077 then files updated by this call have changed permissions (to 600 on the /etc/dconf/db/local in this specific report).
The function which changes the permissions is the g_file_set_contents() from gvdb_table_write_contents() because it creates temporary file with the new contents and then renames it to the resulting one. Since the function updates contents of the file and is not primarily for creating of new file I guess that the resulting file should have the same permissions as the original one.
Could we restore the permissions after the contents has been written?
Moreover, shouldn't we set the permissions to at least 644 by default (on files under /etc/dconf/db/)?
Attached is a patch which restores the permissions.
Regards
Marek
Patch 315420, "Restore permissions on changed files":
0001-gvdb-Restore-permissions-on-changed-files.patch
Version: git master