summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh
diff options
context:
space:
mode:
authormarkus <markus@openbsd.org>2002-04-10 08:21:47 +0000
committermarkus <markus@openbsd.org>2002-04-10 08:21:47 +0000
commitc31fcd89da2bcbc79249f6d3285c17423b7c2922 (patch)
tree0db23fa0f21b45bd64dcd75d3dd3bf47beae2d4d /usr.bin/ssh
parentsync (diff)
downloadwireguard-openbsd-c31fcd89da2bcbc79249f6d3285c17423b7c2922.tar.xz
wireguard-openbsd-c31fcd89da2bcbc79249f6d3285c17423b7c2922.zip
strip '@' from username only for KerbV and known broken clients, bug #204
Diffstat (limited to 'usr.bin/ssh')
-rw-r--r--usr.bin/ssh/auth1.c14
-rw-r--r--usr.bin/ssh/compat.c10
-rw-r--r--usr.bin/ssh/compat.h3
3 files changed, 19 insertions, 8 deletions
diff --git a/usr.bin/ssh/auth1.c b/usr.bin/ssh/auth1.c
index 9e8d11086f6..27140a9b698 100644
--- a/usr.bin/ssh/auth1.c
+++ b/usr.bin/ssh/auth1.c
@@ -10,7 +10,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: auth1.c,v 1.39 2002/03/19 14:27:39 markus Exp $");
+RCSID("$OpenBSD: auth1.c,v 1.40 2002/04/10 08:21:47 markus Exp $");
#include "xmalloc.h"
#include "rsa.h"
@@ -323,7 +323,7 @@ do_authentication(void)
{
Authctxt *authctxt;
u_int ulen;
- char *p, *user, *style = NULL;
+ char *user, *style = NULL;
/* Get the name of the user that we wish to log in as. */
packet_read_expect(SSH_CMSG_USER);
@@ -335,9 +335,15 @@ do_authentication(void)
if ((style = strchr(user, ':')) != NULL)
*style++ = '\0';
+#ifdef KRB5
/* XXX - SSH.com Kerberos v5 braindeath. */
- if ((p = strchr(user, '@')) != NULL)
- *p = '\0';
+ if ((datafellows & SSH_BUG_K5USER) &&
+ options.kerberos_authentication) {
+ char *p;
+ if ((p = strchr(user, '@')) != NULL)
+ *p = '\0';
+ }
+#endif
authctxt = authctxt_new();
authctxt->user = user;
diff --git a/usr.bin/ssh/compat.c b/usr.bin/ssh/compat.c
index 8671e641b43..406b47c2571 100644
--- a/usr.bin/ssh/compat.c
+++ b/usr.bin/ssh/compat.c
@@ -23,7 +23,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: compat.c,v 1.62 2002/03/25 21:13:51 markus Exp $");
+RCSID("$OpenBSD: compat.c,v 1.63 2002/04/10 08:21:47 markus Exp $");
#include "buffer.h"
#include "packet.h"
@@ -127,8 +127,12 @@ compat_datafellows(const char *version)
"1.2.19*,"
"1.2.20*,"
"1.2.21*,"
- "1.2.22*", SSH_BUG_IGNOREMSG },
- { "1.3.2*", SSH_BUG_IGNOREMSG }, /* f-secure */
+ "1.2.22*", SSH_BUG_IGNOREMSG|SSH_BUG_K5USER },
+ { "1.3.2*", /* F-Secure */
+ SSH_BUG_IGNOREMSG|SSH_BUG_K5USER },
+ { "1.2.1*,"
+ "1.2.2*,"
+ "1.2.3*", SSH_BUG_K5USER },
{ "*SSH Compatible Server*", /* Netscreen */
SSH_BUG_PASSWORDPAD },
{ "*OSU_0*,"
diff --git a/usr.bin/ssh/compat.h b/usr.bin/ssh/compat.h
index 3fb0f97999d..7afca046019 100644
--- a/usr.bin/ssh/compat.h
+++ b/usr.bin/ssh/compat.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: compat.h,v 1.31 2002/03/25 21:13:51 markus Exp $ */
+/* $OpenBSD: compat.h,v 1.32 2002/04/10 08:21:47 markus Exp $ */
/*
* Copyright (c) 1999, 2000, 2001 Markus Friedl. All rights reserved.
@@ -53,6 +53,7 @@
#define SSH_BUG_DERIVEKEY 0x00040000
#define SSH_BUG_DUMMYCHAN 0x00100000
#define SSH_BUG_EXTEOF 0x00200000
+#define SSH_BUG_K5USER 0x00400000
void enable_compat13(void);
void enable_compat20(void);