summaryrefslogtreecommitdiffstats
path: root/usr.sbin/moused/moused.c
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2005-09-16 11:24:28 +0000
committerpjd <pjd@FreeBSD.org>2005-09-16 11:24:28 +0000
commitc71407b5890e69c4a1adc0e0936f0d7e9cd24be4 (patch)
treed2465334cbecfbd0881a19b190bef28772de14f5 /usr.sbin/moused/moused.c
parentd2f7ab28daf6bc7f93eb290728f89c7d713ca0ce (diff)
downloadFreeBSD-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/moused/moused.c')
-rw-r--r--usr.sbin/moused/moused.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/moused/moused.c b/usr.sbin/moused/moused.c
index 9fa5145..39efac1 100644
--- a/usr.sbin/moused/moused.c
+++ b/usr.sbin/moused/moused.c
@@ -918,7 +918,7 @@ moused(void)
logerr(1, "cannot open /dev/consolectl");
if (!nodaemon && !background) {
- pfh = pidfile_open(pidfile, 0644, &mpid);
+ pfh = pidfile_open(pidfile, 0600, &mpid);
if (pfh == NULL) {
if (errno == EEXIST)
logerrx(1, "moused already running, pid: %d", mpid);
OpenPOWER on IntegriCloud