[glib/keyfile-backend-dir-permissions] keyfile settings: Use tighter permissions
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/keyfile-backend-dir-permissions] keyfile settings: Use tighter permissions
- Date: Tue, 22 Jan 2019 18:27:48 +0000 (UTC)
commit b8e97ae2d16015fc5b9acbf9901136a1d1671999
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Jan 22 13:26:31 2019 -0500
keyfile settings: Use tighter permissions
When creating directories, create them with 700 permissions,
instead of 777.
Closes: #1658
gio/gkeyfilesettingsbackend.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gio/gkeyfilesettingsbackend.c b/gio/gkeyfilesettingsbackend.c
index d5796b706..44169fa5e 100644
--- a/gio/gkeyfilesettingsbackend.c
+++ b/gio/gkeyfilesettingsbackend.c
@@ -704,7 +704,7 @@ g_keyfile_settings_backend_constructed (GObject *object)
kfsb->permission = g_simple_permission_new (TRUE);
kfsb->dir = g_file_get_parent (kfsb->file);
- g_file_make_directory_with_parents (kfsb->dir, NULL, NULL);
+ g_mkdir_with_parents (g_file_peek_path (kfsb->dir), 700);
kfsb->file_monitor = g_file_monitor (kfsb->file, G_FILE_MONITOR_NONE, NULL, NULL);
kfsb->dir_monitor = g_file_monitor (kfsb->dir, G_FILE_MONITOR_NONE, NULL, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]