diff options
author | 2002-04-10 08:21:47 +0000 | |
---|---|---|
committer | 2002-04-10 08:21:47 +0000 | |
commit | c31fcd89da2bcbc79249f6d3285c17423b7c2922 (patch) | |
tree | 0db23fa0f21b45bd64dcd75d3dd3bf47beae2d4d /usr.bin/ssh/auth1.c | |
parent | sync (diff) | |
download | wireguard-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/auth1.c')
-rw-r--r-- | usr.bin/ssh/auth1.c | 14 |
1 files changed, 10 insertions, 4 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; |