]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/tty.c
Call sys_close in the child when starting charshunt to make sure
[ppp.git] / pppd / tty.c
index b21a158f2e927298bcd8342df514843017358fec..57f7465c48ceaf8c242d32d6a0de93e812432d02 100644 (file)
@@ -20,7 +20,7 @@
  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  */
 
  * 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 <stdio.h>
 #include <ctype.h>
 
 #include <stdio.h>
 #include <ctype.h>
@@ -841,6 +841,7 @@ start_charshunt(ifd, ofd)
        if (getuid() != uid)
            fatal("setuid failed");
        setgid(getgid());
        if (getuid() != uid)
            fatal("setuid failed");
        setgid(getgid());
+       sys_close();
        if (!nodetach)
            log_to_fd = -1;
        charshunt(ifd, ofd, record_file);
        if (!nodetach)
            log_to_fd = -1;
        charshunt(ifd, ofd, record_file);