diff options
Diffstat (limited to 'ssh.c')
-rw-r--r-- | ssh.c | 13 |
1 files changed, 3 insertions, 10 deletions
@@ -18,7 +18,7 @@ Modified to work with SSL by Niels Provos <provos@citi.umich.edu> in Canada. | |||
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include "includes.h" | 20 | #include "includes.h" |
21 | RCSID("$Id: ssh.c,v 1.3 1999/10/28 05:23:30 damien Exp $"); | 21 | RCSID("$Id: ssh.c,v 1.4 1999/10/30 01:39:56 damien Exp $"); |
22 | 22 | ||
23 | #include "xmalloc.h" | 23 | #include "xmalloc.h" |
24 | #include "ssh.h" | 24 | #include "ssh.h" |
@@ -213,7 +213,6 @@ main(int ac, char **av) | |||
213 | else | 213 | else |
214 | cp = av0; | 214 | cp = av0; |
215 | if (strcmp(cp, "rsh") != 0 && strcmp(cp, "ssh") != 0 && | 215 | if (strcmp(cp, "rsh") != 0 && strcmp(cp, "ssh") != 0 && |
216 | strcmp(cp, "openssh") != 0 && strcmp(cp, "openlogin") != 0 && | ||
217 | strcmp(cp, "rlogin") != 0 && strcmp(cp, "slogin") != 0) | 216 | strcmp(cp, "rlogin") != 0 && strcmp(cp, "slogin") != 0) |
218 | host = cp; | 217 | host = cp; |
219 | 218 | ||
@@ -500,7 +499,7 @@ main(int ac, char **av) | |||
500 | } | 499 | } |
501 | 500 | ||
502 | /* Disable rhosts authentication if not running as root. */ | 501 | /* Disable rhosts authentication if not running as root. */ |
503 | if (original_effective_uid != 0) | 502 | if (original_effective_uid != 0 || !options.use_privileged_port) |
504 | { | 503 | { |
505 | options.rhosts_authentication = 0; | 504 | options.rhosts_authentication = 0; |
506 | options.rhosts_rsa_authentication = 0; | 505 | options.rhosts_rsa_authentication = 0; |
@@ -526,13 +525,7 @@ main(int ac, char **av) | |||
526 | restore_uid(); | 525 | restore_uid(); |
527 | 526 | ||
528 | /* Open a connection to the remote host. This needs root privileges if | 527 | /* Open a connection to the remote host. This needs root privileges if |
529 | rhosts_{rsa_}authentication is true. */ | 528 | rhosts_{rsa_}authentication is enabled. */ |
530 | |||
531 | if (!options.use_privileged_port) | ||
532 | { | ||
533 | options.rhosts_authentication = 0; | ||
534 | options.rhosts_rsa_authentication = 0; | ||
535 | } | ||
536 | 529 | ||
537 | ok = ssh_connect(host, &hostaddr, options.port, options.connection_attempts, | 530 | ok = ssh_connect(host, &hostaddr, options.port, options.connection_attempts, |
538 | !options.rhosts_authentication && | 531 | !options.rhosts_authentication && |