summaryrefslogtreecommitdiff
path: root/pppd/tdb.c
diff options
context:
space:
mode:
authorFrank Cusack <fcusack@fcusack.com>2003-02-24 10:28:00 +0000
committerFrank Cusack <fcusack@fcusack.com>2003-02-24 10:28:00 +0000
commit03af5b9a2cc1264ffbfc4fa8babe95dcc7ef644d (patch)
tree692bc8c4a37c5d7cee11510d9f51deffdfe0b078 /pppd/tdb.c
parent82673251b4b9b6108d84f2973ea2bd66d5ba5895 (diff)
downloadppp-03af5b9a2cc1264ffbfc4fa8babe95dcc7ef644d.tar.gz
Don't leak tdb file descriptor to scripts. Bug reported by Steve Grubb.
Diffstat (limited to 'pppd/tdb.c')
-rw-r--r--pppd/tdb.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/pppd/tdb.c b/pppd/tdb.c
index c6498d6..024b502 100644
--- a/pppd/tdb.c
+++ b/pppd/tdb.c
@@ -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 */