summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1999-12-06 19:04:59 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1999-12-06 19:04:59 +0000
commitdfd07300d1c73f8ba8353f4fa63af80ec13a9cec (patch)
tree4444658acee456ba94a4fe954c9f4f373777b985 /lib
parenta8021a4383495f7d7cbf25ac52378e30817e4ebd (diff)
fd leak
Diffstat (limited to 'lib')
-rw-r--r--lib/libskey/skeylogin.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/libskey/skeylogin.c b/lib/libskey/skeylogin.c
index dfb6ea5f2c5..57c85e932d5 100644
--- a/lib/libskey/skeylogin.c
+++ b/lib/libskey/skeylogin.c
@@ -12,7 +12,7 @@
*
* S/KEY verification check, lookups, and authentication.
*
- * $OpenBSD: skeylogin.c,v 1.33 1999/11/26 19:26:17 deraadt Exp $
+ * $OpenBSD: skeylogin.c,v 1.34 1999/12/06 19:04:58 deraadt Exp $
*/
#include <sys/param.h>
@@ -498,6 +498,7 @@ skey_authenticate(username)
SEEK_SET) != -1 && read(fd, hseed,
SKEY_MAX_SEED_LEN) == SKEY_MAX_SEED_LEN) {
close(fd);
+ fd = -1;
secret = hseed;
secretlen = SKEY_MAX_SEED_LEN;
flg = 0;
@@ -507,6 +508,8 @@ skey_authenticate(username)
secretlen = strlen(secret);
flg = 0;
}
+ if (fd != -1)
+ close(fd);
}
/* Put that in your pipe and smoke it */