blob: 399f06a0eac3883c69e0366bd8f899d61e15a638 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
--- lib/pid_output.c 17 Dec 2004 20:50:00 -0000 1.9
+++ lib/pid_output.c 4 Oct 2007 15:07:57 -0000
@@ -25,6 +25,7 @@
#include <log.h>
#include "version.h"
+#define PIDFILE_MASK 0644
#ifndef HAVE_FCNTL
pid_t
@@ -36,7 +37,7 @@ pid_output (const char *path)
pid = getpid();
- oldumask = umask(0777 & ~LOGFILE_MASK);
+ oldumask = umask(0777 & ~PIDFILE_MASK);
fp = fopen (path, "w");
if (fp != NULL)
{
@@ -67,8 +68,8 @@ pid_output (const char *path)
pid = getpid ();
- oldumask = umask(0777 & ~LOGFILE_MASK);
- fd = open (path, O_RDWR | O_CREAT, LOGFILE_MASK);
+ oldumask = umask(0777 & ~PIDFILE_MASK);
+ fd = open (path, O_RDWR | O_CREAT, PIDFILE_MASK);
if (fd < 0)
{
zlog_err("Can't create pid lock file %s (%s), exiting",
|