HomeFreeBSD

r341692 changed cap_syslog(3) to preserve the stdio descriptors inherited

Description

r341692 changed cap_syslog(3) to preserve the stdio descriptors inherited
from its parent so that LOG_PERROR would work. However, this caused
dhclient(8)'s stdio streams to remain open across daemonization, breaking
the ability to capture its foreground output as done in netconfig_ipv4.

Fix this by reverting r341692 and instead passing the parent's stderr
descriptor as an argument to cap_openlog() only when LOG_PERROR is specified
in logopt.

PR: 234514
Suggested by: markj
Reported by: Shawn Webb
Reviewed by: markj, oshogbo
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D18989

Details

Committed
jahFeb 6 2019, 4:36 AM
Reviewer
markj
Differential Revision
D18989: Allow stdio access to be revoked from casper services
Parents
rS343826: pwm.8: fix markup in synopsis, add -f description
Branches
Unknown
Tags
Unknown