[gnome-software/wip/kalev/umask-022] Enforce a more permissive umask
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/kalev/umask-022] Enforce a more permissive umask
- Date: Fri, 26 Apr 2019 11:13:05 +0000 (UTC)
commit ef4f0884e9025e2dd8b89a5c71023f1d5b399f31
Author: Kalev Lember <klember redhat com>
Date: Thu Apr 25 10:29:41 2019 +0200
Enforce a more permissive umask
Override the umask to 022 to make it possible to share files between the
gnome-software process and flatpak system helper process. Ideally this
should be set when needed in the flatpak plugin, but umask is
thread-unsafe so there is really no local way to fix this.
This matches flatpak PR https://github.com/flatpak/flatpak/pull/2856
src/gs-main.c | 8 ++++++++
1 file changed, 8 insertions(+)
---
diff --git a/src/gs-main.c b/src/gs-main.c
index 2cd43634..ec9c0a63 100644
--- a/src/gs-main.c
+++ b/src/gs-main.c
@@ -14,6 +14,7 @@
#include <gio/gdesktopappinfo.h>
#include <gtk/gtk.h>
#include <locale.h>
+#include <sys/stat.h>
#include "gs-application.h"
#include "gs-debug.h"
@@ -32,6 +33,13 @@ main (int argc, char **argv)
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
+ /* Override the umask to 022 to make it possible to share files between
+ * the gnome-software process and flatpak system helper process.
+ * Ideally this should be set when needed in the flatpak plugin, but
+ * umask is thread-unsafe so there is really no local way to fix this.
+ */
+ umask (022);
+
/* redirect logs */
application = gs_application_new ();
appinfo = g_desktop_app_info_new ("org.gnome.Software.desktop");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]