diff options
author | Caleb St. John <yocalebo@gmail.com> | 2021-03-26 18:00:14 +0000 |
---|---|---|
committer | Ryan Moeller <freqlabs@FreeBSD.org> | 2021-03-29 13:33:35 +0000 |
commit | af68f5380642b3beb7be25cdacd73848f9c680e3 (patch) | |
tree | 30c68d30a080574cca5cc7ec321da664f71b499c /usr.sbin/rpc.lockd | |
parent | b92b2ffd1233d9513dfcbb412c2bb578eef70e05 (diff) | |
download | src-af68f5380642b3beb7be25cdacd73848f9c680e3.tar.gz src-af68f5380642b3beb7be25cdacd73848f9c680e3.zip |
rpc.lockd: Unconditionally close fds as daemon
When lockd is configured with a debug level of > 0 and foreground == 0,
the process is daemonized with a truth noclose argument to daemon().
This doesn't seem to be the desired behavior because that prevents
stdout and stderr from being closed, however, stdout and stderr aren't
used anywhere else. Furthermore, the man pages state that with a higher
debug level it will use the syslog facilities to do so.
Submitted by: Caleb St. John
Discussed with: rmacklem
MFC after: 3 days
Sponsored by: iXsystems, Inc.
Differential Revision: https://reviews.freebsd.org/D29415
(cherry picked from commit badcfbacf3840a4097bb79192054481c7674e7d2)
Diffstat (limited to 'usr.sbin/rpc.lockd')
-rw-r--r-- | usr.sbin/rpc.lockd/lockd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/rpc.lockd/lockd.c b/usr.sbin/rpc.lockd/lockd.c index 9aac9273b3fd..e25cef9993bb 100644 --- a/usr.sbin/rpc.lockd/lockd.c +++ b/usr.sbin/rpc.lockd/lockd.c @@ -426,7 +426,7 @@ main(int argc, char **argv) * Note that it is NOT sensible to run this program from inetd - the * protocol assumes that it will run immediately at boot time. */ - if ((foreground == 0) && daemon(0, debug_level > 0)) { + if ((foreground == 0) && daemon(0, 0)) { err(1, "cannot fork"); /* NOTREACHED */ } |