version 1.186, 2002/09/19 01:58:18 |
version 1.186.2.1, 2003/04/01 00:12:14 |
|
|
av += optind; |
av += optind; |
|
|
if (ac > 0 && !host && **av != '-') { |
if (ac > 0 && !host && **av != '-') { |
if (strchr(*av, '@')) { |
if (strrchr(*av, '@')) { |
p = xstrdup(*av); |
p = xstrdup(*av); |
cp = strchr(p, '@'); |
cp = strrchr(p, '@'); |
if (cp == NULL || cp == p) |
if (cp == NULL || cp == p) |
usage(); |
usage(); |
options.user = p; |
options.user = p; |
|
|
host = ++cp; |
host = ++cp; |
} else |
} else |
host = *av; |
host = *av; |
ac--, av++; |
if (ac > 1) { |
if (ac > 0) { |
optind = optreset = 1; |
optind = 0; |
|
optreset = 1; |
|
goto again; |
goto again; |
} |
} |
|
ac--, av++; |
} |
} |
|
|
/* Check that we got a host name. */ |
/* Check that we got a host name. */ |
|
|
if (options.hostname != NULL) |
if (options.hostname != NULL) |
host = options.hostname; |
host = options.hostname; |
|
|
|
if (options.proxy_command != NULL && |
|
strcmp(options.proxy_command, "none") == 0) |
|
options.proxy_command = NULL; |
|
|
/* Disable rhosts authentication if not running as root. */ |
/* Disable rhosts authentication if not running as root. */ |
if (original_effective_uid != 0 || !options.use_privileged_port) { |
if (original_effective_uid != 0 || !options.use_privileged_port) { |
debug("Rhosts Authentication disabled, " |
debug("Rhosts Authentication disabled, " |
|
|
int interactive = 0; |
int interactive = 0; |
struct termios tio; |
struct termios tio; |
|
|
debug("ssh_session2_setup: id %d", id); |
debug2("ssh_session2_setup: id %d", id); |
|
|
if (tty_flag) { |
if (tty_flag) { |
struct winsize ws; |
struct winsize ws; |