Bug 594034 - Use g_mkstemp_full() when creating the replacement file
authorBenjamin Otte <otte@gnome.org>
Thu, 3 Sep 2009 13:39:57 +0000 (15:39 +0200)
committerBenjamin Otte <otte@gnome.org>
Fri, 4 Sep 2009 20:45:57 +0000 (22:45 +0200)
commit4114f1214c65f0a142678bf98b1d8e4da43bf665
tree11c432f8a8142f66a94913970241baaf756af205
parent24bec5c5bd64eb829a433e4c1e8d34dc25879a64
Bug 594034 - Use g_mkstemp_full() when creating the replacement file

Previous code used g_mkstemp(). But when using
G_FILE_CREATE_REPLACE_DESTINATION, no attempt was made to ensure proper
mode and flags of the created temporary file. The visible issue was that
the file was always created with mode 0600 as opposed to using 0666.
(The invisible issue was that O_RDWR was used instead of O_WRONLY.)
docs/reference/glib/tmpl/glib-unused.sgml
docs/reference/glib/tmpl/macros_misc.sgml
docs/reference/glib/tmpl/misc_utils.sgml
docs/reference/glib/tmpl/version.sgml
gio/glocalfileoutputstream.c