diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 1999-10-28 21:29:27 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 1999-10-28 21:29:27 +0000 |
commit | 536061e0678ce2a394d7b9d6537bdc0f7b3eb32e (patch) | |
tree | eae98c4974698d376421e2f12d678d21a6cd297c /usr.bin/ssh/ssh.c | |
parent | b6fee2518370c3bee38f62b53ef78f0bcb7d0e4d (diff) |
save a few lines when disabling rhosts-{rsa-}auth
Diffstat (limited to 'usr.bin/ssh/ssh.c')
-rw-r--r-- | usr.bin/ssh/ssh.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/usr.bin/ssh/ssh.c b/usr.bin/ssh/ssh.c index ee37ed5675d..d0f3ed8e8eb 100644 --- a/usr.bin/ssh/ssh.c +++ b/usr.bin/ssh/ssh.c @@ -18,7 +18,7 @@ Modified to work with SSL by Niels Provos <provos@citi.umich.edu> in Canada. */ #include "includes.h" -RCSID("$Id: ssh.c,v 1.25 1999/10/26 22:38:51 markus Exp $"); +RCSID("$Id: ssh.c,v 1.26 1999/10/28 21:29:26 markus Exp $"); #include "xmalloc.h" #include "ssh.h" @@ -499,7 +499,7 @@ main(int ac, char **av) } /* Disable rhosts authentication if not running as root. */ - if (original_effective_uid != 0) + if (original_effective_uid != 0 || !options.use_privileged_port) { options.rhosts_authentication = 0; options.rhosts_rsa_authentication = 0; @@ -525,13 +525,7 @@ main(int ac, char **av) restore_uid(); /* Open a connection to the remote host. This needs root privileges if - rhosts_{rsa_}authentication is true. */ - - if (!options.use_privileged_port) - { - options.rhosts_authentication = 0; - options.rhosts_rsa_authentication = 0; - } + rhosts_{rsa_}authentication is enabled. */ ok = ssh_connect(host, &hostaddr, options.port, options.connection_attempts, !options.rhosts_authentication && |