summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/auth.c
diff options
context:
space:
mode:
authormarkus <markus@openbsd.org>2003-08-26 09:58:43 +0000
committermarkus <markus@openbsd.org>2003-08-26 09:58:43 +0000
commitd830d5a5cf2daa6c586952ff616c991583956b8d (patch)
tree7dc38fa0ae15fbb005bffc665cce7aa3b6720319 /usr.bin/ssh/auth.c
parentmark cloned route with RTF_CLONED. remove RTF_CLONED route when clone parent (diff)
downloadwireguard-openbsd-d830d5a5cf2daa6c586952ff616c991583956b8d.tar.xz
wireguard-openbsd-d830d5a5cf2daa6c586952ff616c991583956b8d.zip
fix passwd auth for 'username leaks via timing'; with djm@, original patches from solar
Diffstat (limited to 'usr.bin/ssh/auth.c')
-rw-r--r--usr.bin/ssh/auth.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/usr.bin/ssh/auth.c b/usr.bin/ssh/auth.c
index 89882c56b5e..4b66fa09ae3 100644
--- a/usr.bin/ssh/auth.c
+++ b/usr.bin/ssh/auth.c
@@ -23,7 +23,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: auth.c,v 1.48 2003/06/02 09:17:34 markus Exp $");
+RCSID("$OpenBSD: auth.c,v 1.49 2003/08/26 09:58:43 markus Exp $");
#include <libgen.h>
@@ -471,3 +471,22 @@ auth_debug_reset(void)
auth_debug_init = 1;
}
}
+
+struct passwd *
+fakepw(void)
+{
+ static struct passwd fake;
+
+ memset(&fake, 0, sizeof(fake));
+ fake.pw_name = "NOUSER";
+ fake.pw_passwd =
+ "$2a$06$r3.juUaHZDlIbQaO2dS9FuYxL1W9M81R1Tc92PoSNmzvpEqLkLGrK";
+ fake.pw_gecos = "NOUSER";
+ fake.pw_uid = -1;
+ fake.pw_gid = -1;
+ fake.pw_class = "";
+ fake.pw_dir = "/nonexist";
+ fake.pw_shell = "/nonexist";
+
+ return (&fake);
+}