summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/ssh.c
diff options
context:
space:
mode:
authormarkus <markus@openbsd.org>2000-01-04 09:07:59 +0000
committermarkus <markus@openbsd.org>2000-01-04 09:07:59 +0000
commit3cce3394e0654bf11f38332e5685eec3dc37c87b (patch)
treee891b0d879205133cf045adb833203e389bdee56 /usr.bin/ssh/ssh.c
parentlisten on _all_ interfaces for X11-Fwd (hints.ai_flags = AI_PASSIVE) (diff)
downloadwireguard-openbsd-3cce3394e0654bf11f38332e5685eec3dc37c87b.tar.xz
wireguard-openbsd-3cce3394e0654bf11f38332e5685eec3dc37c87b.zip
'ssh @host' is illegal (null user name), from karsten@gedankenpolizei.de
Diffstat (limited to 'usr.bin/ssh/ssh.c')
-rw-r--r--usr.bin/ssh/ssh.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/ssh/ssh.c b/usr.bin/ssh/ssh.c
index e4d48b5438d..ca99f2818e5 100644
--- a/usr.bin/ssh/ssh.c
+++ b/usr.bin/ssh/ssh.c
@@ -11,7 +11,7 @@
*/
#include "includes.h"
-RCSID("$Id: ssh.c,v 1.37 2000/01/04 00:08:00 markus Exp $");
+RCSID("$Id: ssh.c,v 1.38 2000/01/04 09:07:59 markus Exp $");
#include "xmalloc.h"
#include "ssh.h"
@@ -227,6 +227,8 @@ main(int ac, char **av)
if (host)
break;
if ((cp = strchr(av[optind], '@'))) {
+ if(cp == av[optind])
+ usage();
options.user = av[optind];
*cp = '\0';
host = ++cp;