diff options
Diffstat (limited to 'auth2-pubkey.c')
-rw-r--r-- | auth2-pubkey.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/auth2-pubkey.c b/auth2-pubkey.c index d51e939f1..3063eecc3 100644 --- a/auth2-pubkey.c +++ b/auth2-pubkey.c | |||
@@ -23,7 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include "includes.h" | 25 | #include "includes.h" |
26 | RCSID("$OpenBSD: auth2-pubkey.c,v 1.4 2003/06/24 08:23:46 markus Exp $"); | 26 | RCSID("$OpenBSD: auth2-pubkey.c,v 1.6 2004/01/19 21:25:15 markus Exp $"); |
27 | 27 | ||
28 | #include "ssh2.h" | 28 | #include "ssh2.h" |
29 | #include "xmalloc.h" | 29 | #include "xmalloc.h" |
@@ -123,9 +123,9 @@ userauth_pubkey(Authctxt *authctxt) | |||
123 | authenticated = 0; | 123 | authenticated = 0; |
124 | if (PRIVSEP(user_key_allowed(authctxt->pw, key)) && | 124 | if (PRIVSEP(user_key_allowed(authctxt->pw, key)) && |
125 | PRIVSEP(key_verify(key, sig, slen, buffer_ptr(&b), | 125 | PRIVSEP(key_verify(key, sig, slen, buffer_ptr(&b), |
126 | buffer_len(&b))) == 1) | 126 | buffer_len(&b))) == 1) |
127 | authenticated = 1; | 127 | authenticated = 1; |
128 | buffer_clear(&b); | 128 | buffer_free(&b); |
129 | xfree(sig); | 129 | xfree(sig); |
130 | } else { | 130 | } else { |
131 | debug("test whether pkalg/pkblob are acceptable"); | 131 | debug("test whether pkalg/pkblob are acceptable"); |
@@ -175,9 +175,6 @@ user_key_allowed2(struct passwd *pw, Key *key, char *file) | |||
175 | Key *found; | 175 | Key *found; |
176 | char *fp; | 176 | char *fp; |
177 | 177 | ||
178 | if (pw == NULL) | ||
179 | return 0; | ||
180 | |||
181 | /* Temporarily use the user's uid. */ | 178 | /* Temporarily use the user's uid. */ |
182 | temporarily_use_uid(pw); | 179 | temporarily_use_uid(pw); |
183 | 180 | ||