From 0a5f7f46f597ae4fee342163de31c724096feb12 Mon Sep 17 00:00:00 2001 From: Paul Mackerras Date: Thu, 12 Sep 2002 22:34:47 +0000 Subject: [PATCH] Call sys_close in the child when starting charshunt to make sure we don't leak PPP fds to the charshunt. --- pppd/tty.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); -- 2.39.2