From: Frank Cusack Date: Mon, 24 Feb 2003 10:28:00 +0000 (+0000) Subject: Don't leak tdb file descriptor to scripts. Bug reported by Steve Grubb. X-Git-Tag: ppp-2.4.7~330 X-Git-Url: http://git.ozlabs.org/?a=commitdiff_plain;h=03af5b9a2cc1264ffbfc4fa8babe95dcc7ef644d;p=ppp.git Don't leak tdb file descriptor to scripts. Bug reported by Steve Grubb. --- 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 */