diff options
author | Joe Marcus Clarke <marcus@FreeBSD.org> | 2007-04-13 04:00:18 +0000 |
---|---|---|
committer | Joe Marcus Clarke <marcus@FreeBSD.org> | 2007-04-13 04:00:18 +0000 |
commit | 0209be90925add6aea8f30135b1bfbb914b8050f (patch) | |
tree | a942b17b94ccad0fe7e564c87ee8abbfbb3224f9 /sysutils/system-tools-backends/files | |
parent | Put back asterisk12 and asterisk12-addons. (diff) |
Pass an explicit mode to open() so that the PID file is created with sane
permissions.
Reported by: netchild
Diffstat (limited to 'sysutils/system-tools-backends/files')
-rw-r--r-- | sysutils/system-tools-backends/files/patch-dispatcher_dispatcher.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sysutils/system-tools-backends/files/patch-dispatcher_dispatcher.c b/sysutils/system-tools-backends/files/patch-dispatcher_dispatcher.c new file mode 100644 index 000000000000..f1f49929e772 --- /dev/null +++ b/sysutils/system-tools-backends/files/patch-dispatcher_dispatcher.c @@ -0,0 +1,11 @@ +--- dispatcher/dispatcher.c.orig Thu Apr 12 23:55:38 2007 ++++ dispatcher/dispatcher.c Thu Apr 12 23:57:40 2007 +@@ -203,7 +203,7 @@ daemonize (void) + + setsid (); + +- if ((pidfile_fd = open (LOCALSTATEDIR "/run/system-tools-backends.pid", O_CREAT | O_WRONLY)) != -1) ++ if ((pidfile_fd = open (LOCALSTATEDIR "/run/system-tools-backends.pid", O_CREAT | O_WRONLY, 0600)) != -1) + { + str = g_strdup_printf ("%d", getpid ()); + write (pidfile_fd, str, strlen (str)); |