summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/auth-rsa.c
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2000-10-03 18:03:04 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2000-10-03 18:03:04 +0000
commit033cd8fbddbfdfcd132ad14a40be589fb096f993 (patch)
tree3983d6bfe714696f8622b077446c5f678d1dece8 /usr.bin/ssh/auth-rsa.c
parent42514619dc64524e81a9cb6854cbf287a6fdae97 (diff)
move fake-auth from auth1.c to individual auth methods, disables s/key in debug-msg
Diffstat (limited to 'usr.bin/ssh/auth-rsa.c')
-rw-r--r--usr.bin/ssh/auth-rsa.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/usr.bin/ssh/auth-rsa.c b/usr.bin/ssh/auth-rsa.c
index 8aefc8fadad..8b9d8ba47ad 100644
--- a/usr.bin/ssh/auth-rsa.c
+++ b/usr.bin/ssh/auth-rsa.c
@@ -14,7 +14,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: auth-rsa.c,v 1.29 2000/09/07 21:13:36 markus Exp $");
+RCSID("$OpenBSD: auth-rsa.c,v 1.30 2000/10/03 18:03:03 markus Exp $");
#include "rsa.h"
#include "packet.h"
@@ -29,6 +29,10 @@ RCSID("$OpenBSD: auth-rsa.c,v 1.29 2000/09/07 21:13:36 markus Exp $");
#include <openssl/rsa.h>
#include <openssl/md5.h>
+
+/* import */
+extern ServerOptions options;
+
/*
* Session identifier that is used to bind key exchange and authentication
* responses to a particular session.
@@ -116,7 +120,6 @@ auth_rsa_challenge_dialog(RSA *pk)
int
auth_rsa(struct passwd *pw, BIGNUM *client_n)
{
- extern ServerOptions options;
char line[8192], file[1024];
int authenticated;
unsigned int bits;
@@ -125,6 +128,10 @@ auth_rsa(struct passwd *pw, BIGNUM *client_n)
struct stat st;
RSA *pk;
+ /* no user given */
+ if (pw == NULL)
+ return 0;
+
/* Temporarily use the user's uid. */
temporarily_use_uid(pw->pw_uid);