aboutsummaryrefslogtreecommitdiffstats
path: root/src/ppp-watch.c
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2003-06-13 21:46:08 +0000
committerBill Nottingham <notting@redhat.com>2003-06-13 21:46:08 +0000
commita1264de80fbb439076f4314b16e869fc198fb388 (patch)
treedc5c973c1fbdf36a20a776055a5c9b24a8f94b6b /src/ppp-watch.c
parent781b0f41187b41c3cf1d2e0f570ec2432b146660 (diff)
downloadinitscripts-a1264de80fbb439076f4314b16e869fc198fb388.tar
initscripts-a1264de80fbb439076f4314b16e869fc198fb388.tar.gz
initscripts-a1264de80fbb439076f4314b16e869fc198fb388.tar.bz2
initscripts-a1264de80fbb439076f4314b16e869fc198fb388.tar.xz
initscripts-a1264de80fbb439076f4314b16e869fc198fb388.zip
fix leaked fd, potential usernetctl badness, and initlog/process bogons (<linux_4ever@yahoo.com>)
Diffstat (limited to 'src/ppp-watch.c')
-rw-r--r--src/ppp-watch.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ppp-watch.c b/src/ppp-watch.c
index c611d7e4..6a304179 100644
--- a/src/ppp-watch.c
+++ b/src/ppp-watch.c
@@ -162,6 +162,9 @@ detach(char *device) {
* of the pppd process to its parent (i.e., it reads nothing). */
close (pipeArray[0]);
+ /* Don't leak this into programs we call. */
+ fcntl(pipeArray[1], F_SETFD, FD_CLOEXEC);
+
/* Redirect stdio to /dev/null. */
fd = open("/dev/null", O_RDONLY);
dup2(fd, STDIN_FILENO);