FreeBSD Bugzilla – Attachment 180966 Details for
Bug 217924
dhclient: Fails to fork into the background with kern.trap_enotcap=1
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
dhclient.diff
dhclient.diff (text/plain), 999 bytes, created by
Tobias Kortkamp
on 2017-03-19 19:18:19 UTC
(
hide
)
Description:
dhclient.diff
Filename:
MIME Type:
Creator:
Tobias Kortkamp
Created:
2017-03-19 19:18:19 UTC
Size:
999 bytes
patch
obsolete
>diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c >index d20585db0dc..0e502edcbb3 100644 >--- a/sbin/dhclient/dhclient.c >+++ b/sbin/dhclient/dhclient.c >@@ -2368,41 +2368,41 @@ dhcp_option_ev_name(char *buf, size_t buflen, struct option *option) > } > > buf[i] = 0; > return 1; > } > > void > go_daemon(void) > { > static int state = 0; > cap_rights_t rights; > > if (no_daemon || state) > return; > > state = 1; > > /* Stop logging to stderr... */ > log_perror = 0; > >- if (daemon(1, 0) == -1) >+ if (daemon(1, 1) == -1) > error("daemon"); > > cap_rights_init(&rights); > > if (pidfile != NULL) { > pidfile_write(pidfile); > if (cap_rights_limit(pidfile_fileno(pidfile), &rights) < 0 && > errno != ENOSYS) { > error("can't limit pidfile descriptor: %m"); > } > } > > /* we are chrooted, daemon(3) fails to open /dev/null */ > if (nullfd != -1) { > dup2(nullfd, STDIN_FILENO); > dup2(nullfd, STDOUT_FILENO); > dup2(nullfd, STDERR_FILENO); > close(nullfd); > nullfd = -1; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 217924
: 180966