summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>1999-12-06 19:04:57 +0000
committerderaadt <deraadt@openbsd.org>1999-12-06 19:04:57 +0000
commitfa4decb3529ba637c84979b0c4634ad8522b623f (patch)
tree63a7fcef9c0622415ed916a6083cebaf7d0b9fff /usr.bin/ssh
parentuse openpty() if it exists (it does on BSD4_4) (diff)
downloadwireguard-openbsd-fa4decb3529ba637c84979b0c4634ad8522b623f.tar.xz
wireguard-openbsd-fa4decb3529ba637c84979b0c4634ad8522b623f.zip
fd leak
Diffstat (limited to 'usr.bin/ssh')
-rw-r--r--usr.bin/ssh/auth-skey.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/ssh/auth-skey.c b/usr.bin/ssh/auth-skey.c
index 9a1cc35a189..3610a67eff2 100644
--- a/usr.bin/ssh/auth-skey.c
+++ b/usr.bin/ssh/auth-skey.c
@@ -1,5 +1,5 @@
#include "includes.h"
-RCSID("$Id: auth-skey.c,v 1.4 1999/12/01 16:54:35 markus Exp $");
+RCSID("$Id: auth-skey.c,v 1.5 1999/12/06 19:04:57 deraadt Exp $");
#include "ssh.h"
#include "packet.h"
@@ -104,6 +104,7 @@ skey_fake_keyinfo(char *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;
@@ -113,6 +114,8 @@ skey_fake_keyinfo(char *username)
secretlen = strlen(secret);
flg = 0;
}
+ if (fd != -1)
+ close(fd);
}
/* Put that in your pipe and smoke it */