Blame SOURCES/dconf-0.28.0-permissions.patch

e9528a
--- a/gvdb/gvdb-builder.c
e9528a
+++ b/gvdb/gvdb-builder.c
e9528a
@@ -21,6 +21,7 @@
e9528a
 #include "gvdb-format.h"
e9528a
 
e9528a
 #include <glib.h>
e9528a
+#include <glib/gstdio.h>
e9528a
 #include <fcntl.h>
e9528a
 #if !defined(G_OS_WIN32) || !defined(_MSC_VER)
e9528a
 #include <unistd.h>
e9528a
@@ -509,13 +510,20 @@ gvdb_table_write_contents (GHashTable   *table,
e9528a
   gboolean status;
e9528a
   FileBuilder *fb;
e9528a
   GString *str;
e9528a
+  GStatBuf buf;
e9528a
+  gint stat_ret;
e9528a
 
e9528a
   fb = file_builder_new (byteswap);
e9528a
   file_builder_add_hash (fb, table, &root);
e9528a
   str = file_builder_serialise (fb, root);
e9528a
 
e9528a
+  stat_ret = g_stat (filename, &buf;;
e9528a
+
e9528a
   status = g_file_set_contents (filename, str->str, str->len, error);
e9528a
   g_string_free (str, TRUE);
e9528a
 
e9528a
+  if (stat_ret == 0)
e9528a
+    g_chmod (filename, buf.st_mode);
e9528a
+
e9528a
   return status;
e9528a
 }