Date: Mon, 13 Nov 2017 01:35:46 +0000 From: Brooks Davis <brooks@freebsd.org> To: Mariusz Zaborski <oshogbo@FreeBSD.org> 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> In-Reply-To: <201711120854.vAC8sN5n015111@repo.freebsd.org> References: <201711120854.vAC8sN5n015111@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20171113013546.GD76223>