summaryrefslogtreecommitdiffstats
path: root/ssh.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>1999-10-30 11:39:56 +1000
committerDamien Miller <djm@mindrot.org>1999-10-30 11:39:56 +1000
commit1e4772c32c109e6c69291335ad49350e7762785d (patch)
tree1a9224ff01d028a4b9f12a477ccf447624fca96f /ssh.c
parent5ffa64478a963426a1ab92a7b74b87d3ae79ba53 (diff)
Merged latest OpenBSD changes:
nchan.ms -\ channels.[ch] - remove broken x11 fix and document istate/ostate ssh-agent.c - call setsid() regardless of argv[] ssh.c - save a few lines when disabling rhosts-{rsa-}auth
Diffstat (limited to 'ssh.c')
-rw-r--r--ssh.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/ssh.c b/ssh.c
index ed4ceaf4..76300489 100644
--- a/ssh.c
+++ b/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.3 1999/10/28 05:23:30 damien Exp $");
+RCSID("$Id: ssh.c,v 1.4 1999/10/30 01:39:56 damien Exp $");
#include "xmalloc.h"
#include "ssh.h"
@@ -213,7 +213,6 @@ main(int ac, char **av)
else
cp = av0;
if (strcmp(cp, "rsh") != 0 && strcmp(cp, "ssh") != 0 &&
- strcmp(cp, "openssh") != 0 && strcmp(cp, "openlogin") != 0 &&
strcmp(cp, "rlogin") != 0 && strcmp(cp, "slogin") != 0)
host = cp;
@@ -500,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;
@@ -526,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 &&