summaryrefslogtreecommitdiff
path: root/auth-skey.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>1999-12-07 15:38:31 +1100
committerDamien Miller <djm@mindrot.org>1999-12-07 15:38:31 +1100
commit037a0dc0835bb5a442bdcbeecdd5baed723f0b45 (patch)
treed02954d57ac437fd036e3e9544f24559ca8f0f0f /auth-skey.c
parenteabf3417bc73ca9546a3ed489cd809ffdf303853 (diff)
- Merged more OpenBSD changes:
- [atomicio.c authfd.c scp.c serverloop.c ssh.h sshconnect.c sshd.c] move atomicio into it's own file. wrap all socket write()s which were doing write(sock, buf, len) != len, with atomicio() calls. - [auth-skey.c] fd leak - [authfile.c] properly name fd variable - [channels.c] display great hatred towards strcpy - [pty.c pty.h sshd.c] use openpty() if it exists (it does on BSD4_4) - [tildexpand.c] check for ~ expansion past MAXPATHLEN - Modified helper.c to use new atomicio function. - Reformat Makefile a little - Moved RC4 routines from rc4.[ch] into helper.c - Added autoconf code to detect /dev/ptmx (Solaris) and /dev/ptc (AIX)
Diffstat (limited to 'auth-skey.c')
-rw-r--r--auth-skey.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/auth-skey.c b/auth-skey.c
index cc5f45101..882915992 100644
--- a/auth-skey.c
+++ b/auth-skey.c
@@ -1,7 +1,7 @@
1#include "includes.h" 1#include "includes.h"
2 2
3#ifdef SKEY 3#ifdef SKEY
4RCSID("$Id: auth-skey.c,v 1.4 1999/12/01 16:54:35 markus Exp $"); 4RCSID("$Id: auth-skey.c,v 1.5 1999/12/06 19:04:57 deraadt Exp $");
5 5
6#include "ssh.h" 6#include "ssh.h"
7#include "packet.h" 7#include "packet.h"
@@ -114,6 +114,7 @@ skey_fake_keyinfo(char *username)
114 SEEK_SET) != -1 && read(fd, hseed, 114 SEEK_SET) != -1 && read(fd, hseed,
115 SKEY_MAX_SEED_LEN) == SKEY_MAX_SEED_LEN) { 115 SKEY_MAX_SEED_LEN) == SKEY_MAX_SEED_LEN) {
116 close(fd); 116 close(fd);
117 fd = -1;
117 secret = hseed; 118 secret = hseed;
118 secretlen = SKEY_MAX_SEED_LEN; 119 secretlen = SKEY_MAX_SEED_LEN;
119 flg = 0; 120 flg = 0;
@@ -123,6 +124,8 @@ skey_fake_keyinfo(char *username)
123 secretlen = strlen(secret); 124 secretlen = strlen(secret);
124 flg = 0; 125 flg = 0;
125 } 126 }
127 if (fd != -1)
128 close(fd);
126 } 129 }
127 130
128 /* Put that in your pipe and smoke it */ 131 /* Put that in your pipe and smoke it */