From: Frank Cusack Date: Mon, 24 Feb 2003 12:07:26 +0000 (+0000) Subject: Don't leak ppp_fd to scripts. Bug reported by Alexander Bergolth. X-Git-Tag: ppp-2.4.7~327 X-Git-Url: https://git.ozlabs.org/?a=commitdiff_plain;h=31b9087e92f1d0ecf87dc05c2ff4704be7b19870;p=ppp.git Don't leak ppp_fd to scripts. Bug reported by Alexander Bergolth. --- diff --git a/pppd/sys-linux.c b/pppd/sys-linux.c index 4a27cd5..099db53 100644 --- a/pppd/sys-linux.c +++ b/pppd/sys-linux.c @@ -485,6 +485,7 @@ int generic_establish_ppp (int fd) error("Couldn't reopen /dev/ppp: %m"); goto err; } + (void) fcntl(fd, F_SETFD, FD_CLOEXEC); if (ioctl(fd, PPPIOCATTCHAN, &chindex) < 0) { error("Couldn't attach to channel %d: %m", chindex); goto err_close;