diff options
author | 2002-11-27 17:53:35 +0000 | |
---|---|---|
committer | 2002-11-27 17:53:35 +0000 | |
commit | 0f840255625cd02642602eed5d74aa31bbe3024f (patch) | |
tree | 548fcbe062f61f09d3e83e155696709caf5b5b0f /usr.bin/ssh/ssh.c | |
parent | more tweaking (diff) | |
download | wireguard-openbsd-0f840255625cd02642602eed5d74aa31bbe3024f.tar.xz wireguard-openbsd-0f840255625cd02642602eed5d74aa31bbe3024f.zip |
allow usernames with embedded '@', e.g. scp user@vhost@realhost:file /tmp;
http://bugzilla.mindrot.org/show_bug.cgi?id=447; ok mouring@, millert@
Diffstat (limited to 'usr.bin/ssh/ssh.c')
-rw-r--r-- | usr.bin/ssh/ssh.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/ssh/ssh.c b/usr.bin/ssh/ssh.c index c516f6350d0..dc795d72db9 100644 --- a/usr.bin/ssh/ssh.c +++ b/usr.bin/ssh/ssh.c @@ -40,7 +40,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: ssh.c,v 1.187 2002/11/21 23:04:33 markus Exp $"); +RCSID("$OpenBSD: ssh.c,v 1.188 2002/11/27 17:53:35 markus Exp $"); #include <openssl/evp.h> #include <openssl/err.h> @@ -482,9 +482,9 @@ again: av += optind; if (ac > 0 && !host && **av != '-') { - if (strchr(*av, '@')) { + if (strrchr(*av, '@')) { p = xstrdup(*av); - cp = strchr(p, '@'); + cp = strrchr(p, '@'); if (cp == NULL || cp == p) usage(); options.user = p; |