]> git.ozlabs.org Git - ppp.git/commitdiff
Don't leak tdb file descriptor to scripts. Bug reported by Steve Grubb.
authorFrank Cusack <fcusack@fcusack.com>
Mon, 24 Feb 2003 10:28:00 +0000 (10:28 +0000)
committerFrank Cusack <fcusack@fcusack.com>
Mon, 24 Feb 2003 10:28:00 +0000 (10:28 +0000)
pppd/tdb.c

index c6498d651418545e33c4fa0509e203c62e80ddfc..024b50258e7fc82b6e374e8ca402baa8be99df41 100644 (file)
@@ -1134,6 +1134,7 @@ TDB_CONTEXT *tdb_open(char *name, int hash_size, int tdb_flags,
             if (tdb.fd == -1) {
                goto fail;
             }
+           (void) fcntl(tdb.fd, F_SETFD, FD_CLOEXEC);
         }
 
        /* ensure there is only one process initialising at once */