From owner-svn-src-head@freebsd.org Mon Nov 13 01:35:48 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 53C06CA29C6; Mon, 13 Nov 2017 01:35:48 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 31F117C2F0; Mon, 13 Nov 2017 01:35:47 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id 9E3FB5A9F12; Mon, 13 Nov 2017 01:35:46 +0000 (UTC) Date: Mon, 13 Nov 2017 01:35:46 +0000 From: Brooks Davis To: Mariusz Zaborski Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r325741 - head/sbin/dhclient Message-ID: <20171113013546.GD76223@spindle.one-eyed-alien.net> References: <201711120854.vAC8sN5n015111@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="PPYy/fEw/8QCHSq3" Content-Disposition: inline In-Reply-To: <201711120854.vAC8sN5n015111@repo.freebsd.org> User-Agent: Mutt/1.9.1 (2017-09-22) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Nov 2017 01:35:48 -0000 --PPYy/fEw/8QCHSq3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Nov 12, 2017 at 08:54:23AM +0000, Mariusz Zaborski wrote: > Author: oshogbo > Date: Sun Nov 12 08:54:23 2017 > New Revision: 325741 > URL: https://svnweb.freebsd.org/changeset/base/325741 >=20 > Log: > dhclient(8) should not close stdio using daemon(3) function. > =20 > dhclient(8) is chrooted so opening /dev/null always will fail. > In capability world this is also annoying because we getting error that > open(2) is not permitted in Capsicum. dhclient(8) is closing stdio by > precaching fd to /dev/null before chroot. > This is done few lines below daemon(3) function so let's not try to do = that > in daemon(3) function. This makes me wonder if there would be some sense in a syscall that just creates a file descriptor morally equivalant to opening /dev/null. A slightly crazy option would be to extend dup2 to treat some invalid descriptor (-2?) as that. -- Brooks --PPYy/fEw/8QCHSq3 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJaCPbxAAoJEKzQXbSebgfAIp8H/jXQmG8VKBVLgKo2bWIVPzwn o0t367yyRk/9jy5CvUiXDxvHs7ho4xm9cv+wn0gU/bgDH4uP0QXPNLv9c/GiW1di zMoTcap7jld75fy1QJYQpmPopvrmkjIzQFqPA5ldIAO1xQ/0JyOMqjgfzKCHbEWy IkFm+C2ItsjB5xzAhlrhTR+H5rHqmKk2ziYGCqS8FgHX8uUt0IotCDw6NsDB7w+B 6yW/wzya69UoKPA6dGQJqxKl+XPcE+g8Fmqmw4Q/JXWrMDlsq0OvihnWz1mSn2Qb km1Fuc9qUOUVbwLWWSUdAY0WzM0xOnmTjVpd0W0LjmNPqusEA7F7VYVSNk4BfTw= =urCK -----END PGP SIGNATURE----- --PPYy/fEw/8QCHSq3--