From c71407b5890e69c4a1adc0e0936f0d7e9cd24be4 Mon Sep 17 00:00:00 2001 From: pjd Date: Fri, 16 Sep 2005 11:24:28 +0000 Subject: 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 --- usr.sbin/inetd/inetd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'usr.sbin/inetd') diff --git a/usr.sbin/inetd/inetd.c b/usr.sbin/inetd/inetd.c index 4d41e81..e5f7365 100644 --- a/usr.sbin/inetd/inetd.c +++ b/usr.sbin/inetd/inetd.c @@ -467,7 +467,7 @@ main(int argc, char **argv) if (debug == 0) { pid_t otherpid; - pfh = pidfile_open(pid_file, 0644, &otherpid); + pfh = pidfile_open(pid_file, 0600, &otherpid); if (pfh == NULL) { if (errno == EEXIST) { syslog(LOG_ERR, "%s already running, pid: %d", -- cgit v1.1