diff options
author | 1999-12-06 19:04:57 +0000 | |
---|---|---|
committer | 1999-12-06 19:04:57 +0000 | |
commit | fa4decb3529ba637c84979b0c4634ad8522b623f (patch) | |
tree | 63a7fcef9c0622415ed916a6083cebaf7d0b9fff /usr.bin/ssh | |
parent | use openpty() if it exists (it does on BSD4_4) (diff) | |
download | wireguard-openbsd-fa4decb3529ba637c84979b0c4634ad8522b623f.tar.xz wireguard-openbsd-fa4decb3529ba637c84979b0c4634ad8522b623f.zip |
fd leak
Diffstat (limited to 'usr.bin/ssh')
-rw-r--r-- | usr.bin/ssh/auth-skey.c | 5 |
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 */ |