diff options
author | pjd <pjd@FreeBSD.org> | 2005-09-16 11:24:28 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2005-09-16 11:24:28 +0000 |
commit | c71407b5890e69c4a1adc0e0936f0d7e9cd24be4 (patch) | |
tree | d2465334cbecfbd0881a19b190bef28772de14f5 /usr.sbin/watchdogd/watchdogd.c | |
parent | d2f7ab28daf6bc7f93eb290728f89c7d713ca0ce (diff) | |
download | FreeBSD-src-c71407b5890e69c4a1adc0e0936f0d7e9cd24be4.zip FreeBSD-src-c71407b5890e69c4a1adc0e0936f0d7e9cd24be4.tar.gz |
Pidfiles should be created with permission preventing users from opening
them for reading. When user can open file for reading, he can also
flock(2) it, which can lead to confusions.
Pointed out by: green
Diffstat (limited to 'usr.sbin/watchdogd/watchdogd.c')
-rw-r--r-- | usr.sbin/watchdogd/watchdogd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/watchdogd/watchdogd.c b/usr.sbin/watchdogd/watchdogd.c index d8ab361..8d084c7 100644 --- a/usr.sbin/watchdogd/watchdogd.c +++ b/usr.sbin/watchdogd/watchdogd.c @@ -97,7 +97,7 @@ main(int argc, char *argv[]) if (watchdog_onoff(1) == -1) exit(EX_SOFTWARE); - pfh = pidfile_open(pidfile, 0644, &otherpid); + pfh = pidfile_open(pidfile, 0600, &otherpid); if (pfh == NULL) { if (errno == EEXIST) { errx(EX_SOFTWARE, "%s already running, pid: %d", |