[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: Thu, 25 Apr 2019 08:32:53 +0000 (UTC)
commit a23520d5adf3722fa73b2b072f67ee8e4a01b041
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 | 7 +++++++
1 file changed, 7 insertions(+)
---
diff --git a/src/gs-main.c b/src/gs-main.c
index 2cd43634..d38b560f 100644
--- a/src/gs-main.c
+++ b/src/gs-main.c
@@ -32,6 +32,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]