From: Paul Mackerras Date: Thu, 12 Sep 2002 22:34:47 +0000 (+0000) Subject: Call sys_close in the child when starting charshunt to make sure X-Git-Tag: ppp-2.4.7~392 X-Git-Url: https://git.ozlabs.org/?a=commitdiff_plain;h=0a5f7f46f597ae4fee342163de31c724096feb12;p=ppp.git Call sys_close in the child when starting charshunt to make sure we don't leak PPP fds to the charshunt. --- diff --git a/pppd/tty.c b/pppd/tty.c index b21a158..57f7465 100644 --- a/pppd/tty.c +++ b/pppd/tty.c @@ -20,7 +20,7 @@ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ -#define RCSID "$Id: tty.c,v 1.6 2001/03/12 22:59:01 paulus Exp $" +#define RCSID "$Id: tty.c,v 1.7 2002/09/12 22:34:47 paulus Exp $" #include #include @@ -841,6 +841,7 @@ start_charshunt(ifd, ofd) if (getuid() != uid) fatal("setuid failed"); setgid(getgid()); + sys_close(); if (!nodetach) log_to_fd = -1; charshunt(ifd, ofd, record_file);