]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
dhclient(8) should not close stdio using daemon(3) function.
authoroshogbo <oshogbo@FreeBSD.org>
Sun, 12 Nov 2017 08:54:23 +0000 (08:54 +0000)
committeroshogbo <oshogbo@FreeBSD.org>
Sun, 12 Nov 2017 08:54:23 +0000 (08:54 +0000)
commit799ff1d3f323a741c80c3b945dac86fdac29bb20
treef79182074dd6938e245a808971010a2b7beaabb3
parent90ae5f55e79f39253520f8e03d1e6cba188f79e0
dhclient(8) should not close stdio using daemon(3) function.

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.

Reviewed by: cem@
Differential Revision: https://reviews.freebsd.org/D12826
sbin/dhclient/dhclient.c