diff options
author | CoprDistGit <infra@openeuler.org> | 2024-08-01 14:29:56 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2024-08-01 14:29:56 +0000 |
commit | 0d2e60e5ea862904c3419bd2107288904014c219 (patch) | |
tree | 10f08255fafb1616b41752bec63f9df08c8e7ddb /dconf-0.40.0-permissions.patch | |
parent | 9c40f98b79607415c6eb1c3ffcbec1997d3b5c18 (diff) |
automatic import of dconfopeneuler24.03_LTSopeneuler23.09
Diffstat (limited to 'dconf-0.40.0-permissions.patch')
-rw-r--r-- | dconf-0.40.0-permissions.patch | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/dconf-0.40.0-permissions.patch b/dconf-0.40.0-permissions.patch new file mode 100644 index 0000000..151b790 --- /dev/null +++ b/dconf-0.40.0-permissions.patch @@ -0,0 +1,31 @@ +--- a/gvdb/gvdb-builder.c ++++ b/gvdb/gvdb-builder.c +@@ -21,6 +21,7 @@ + #include "gvdb-format.h" + + #include <glib.h> ++#include <glib/gstdio.h> + #include <fcntl.h> + #if !defined(G_OS_WIN32) || !defined(_MSC_VER) + #include <unistd.h> +@@ -509,13 +510,20 @@ gvdb_table_write_contents (GHashTable *table, + gboolean status; + FileBuilder *fb; + GString *str; ++ GStatBuf buf; ++ gint stat_ret; + + fb = file_builder_new (byteswap); + file_builder_add_hash (fb, table, &root); + str = file_builder_serialise (fb, root); + ++ stat_ret = g_stat (filename, &buf); ++ + status = g_file_set_contents (filename, str->str, str->len, error); + g_string_free (str, TRUE); + ++ if (stat_ret == 0) ++ g_chmod (filename, buf.st_mode); ++ + return status; + } |