From 31b9087e92f1d0ecf87dc05c2ff4704be7b19870 Mon Sep 17 00:00:00 2001 From: Frank Cusack Date: Mon, 24 Feb 2003 12:07:26 +0000 Subject: [PATCH] Don't leak ppp_fd to scripts. Bug reported by Alexander Bergolth. --- pppd/sys-linux.c | 1 + 1 file changed, 1 insertion(+) 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; -- 2.39.2