GNOME Bugzilla – Bug 533624
Wrong permissions for pid file
Last modified: 2009-08-18 23:23:28 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
Created attachment 111077 [details] [review] Fix permissions of .pid file
*** Bug 556849 has been marked as a duplicate of this bug. ***
Please commit, as this also breaks the build with a recent GCC.
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));