After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 533624 - Wrong permissions for pid file
Wrong permissions for pid file
Status: RESOLVED FIXED
Product: gnome-system-tools
Classification: Deprecated
Component: s-t-b
CVS latest
Other Linux
: Normal normal
: ---
Assigned To: Carlos Garnacho
: 556849 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-05-17 20:51 UTC by Loïc Minier
Modified: 2009-08-18 23:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix permissions of .pid file (496 bytes, patch)
2008-05-17 20:51 UTC, Loïc Minier
rejected Details | Review

Description Loïc Minier 2008-05-17 20:51:08 UTC
Hi,

The STB pid file has weird permissions for me; Mike Bird provided a patch in Debian bug http://bugs.debian.org/447361 which I'll attach here ported against git.

Bye
Comment 1 Loïc Minier 2008-05-17 20:51:29 UTC
Created attachment 111077 [details] [review]
Fix permissions of .pid file
Comment 2 Cosimo Cecchi 2009-02-24 23:33:33 UTC
*** Bug 556849 has been marked as a duplicate of this bug. ***
Comment 3 Cosimo Cecchi 2009-02-24 23:34:20 UTC
Please commit, as this also breaks the build with a recent GCC.
Comment 4 Milan Bouchet-Valat 2009-08-18 23:23:28 UTC
Seems to have been fixed in 38645998a2bfbf81bb9c5312f9e0969549a0cb16 in March:
diff --git a/dispatcher/main.c b/dispatcher/main.c
index 8088bd0..0448b5e 100644
--- a/dispatcher/main.c
+++ b/dispatcher/main.c
@@ -47,7 +47,9 @@ daemonize (void)
 
   setsid ();
 
-  if ((pidfile_fd = open (LOCALSTATEDIR "/run/system-tools-backends.pid", O_CRE
+  if ((pidfile_fd = open (LOCALSTATEDIR "/run/system-tools-backends.pid",
+                          O_CREAT | O_WRONLY,
+                          S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)) != -1)
     {
       str = g_strdup_printf ("%d", getpid ());
       write (pidfile_fd, str, strlen (str));