diff options
author | ed <ed@FreeBSD.org> | 2008-06-30 20:23:49 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2008-06-30 20:23:49 +0000 |
commit | 0637892261c53e4c8d52dbbf18969cc5aa1159e4 (patch) | |
tree | 4aaa3c8f00492b90c865358d565a300045bee076 /sbin | |
parent | 77ca9e76cd21adf0e8dbac842a5329139ff51a70 (diff) | |
download | FreeBSD-src-0637892261c53e4c8d52dbbf18969cc5aa1159e4.zip FreeBSD-src-0637892261c53e4c8d52dbbf18969cc5aa1159e4.tar.gz |
Run the privileged dhclient process in its own session.
In the MPSAFE TTY branch, I noticed PTY's to be leaked, because
dhclient's privileged process was run inside the session of, say, the
login shell. Make sure we call setsid() here.
Approved by: philip (mentor), brooks
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/dhclient/dhclient.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c index aa6ce55..24016be 100644 --- a/sbin/dhclient/dhclient.c +++ b/sbin/dhclient/dhclient.c @@ -2612,6 +2612,7 @@ fork_privchld(int fd, int fd2) setproctitle("%s [priv]", ifi->name); + setsid(); dup2(nullfd, STDIN_FILENO); dup2(nullfd, STDOUT_FILENO); dup2(nullfd, STDERR_FILENO); |