From owner-dev-commits-src-all@freebsd.org Mon Mar 29 16:13:42 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7C16557BE79; Mon, 29 Mar 2021 16:13:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4F8Hgp35yPz3rlF; Mon, 29 Mar 2021 16:13:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5D92316621; Mon, 29 Mar 2021 16:13:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 12TGDg4O042313; Mon, 29 Mar 2021 16:13:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 12TGDgjE042312; Mon, 29 Mar 2021 16:13:42 GMT (envelope-from git) Date: Mon, 29 Mar 2021 16:13:42 GMT Message-Id: <202103291613.12TGDgjE042312@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ryan Moeller Subject: git: 4fd5354e85e4 - stable/12 - rpc.lockd: Unconditionally close fds as daemon MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: freqlabs X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 4fd5354e85e4e72b91e7690595173b3bbde21490 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Mar 2021 16:13:42 -0000 The branch stable/12 has been updated by freqlabs: URL: https://cgit.FreeBSD.org/src/commit/?id=4fd5354e85e4e72b91e7690595173b3bbde21490 commit 4fd5354e85e4e72b91e7690595173b3bbde21490 Author: Caleb St. John AuthorDate: 2021-03-26 18:00:14 +0000 Commit: Ryan Moeller CommitDate: 2021-03-29 15:13:16 +0000 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) --- usr.sbin/rpc.lockd/lockd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 */ }