diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2002-11-27 17:53:36 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2002-11-27 17:53:36 +0000 |
commit | ffa9a0ea76b607337beefe8bc976e40197aab0d8 (patch) | |
tree | 6cd74ad45fb671c7fb310f2e9a4b5322aabce927 /usr.bin/ssh/ssh.c | |
parent | 6cdaa5c51edf97e51a0586e3a8d9f810573233fb (diff) |
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; |