]> andersk Git - openssh.git/blobdiff - ssh.c
Merged latest OpenBSD changes:
[openssh.git] / ssh.c
diff --git a/ssh.c b/ssh.c
index 33c12484db6bc4dac0d171d4477f3e7cb72626d5..a16c5199491d644e6fc9facead1e4e12dbc96209 100644 (file)
--- a/ssh.c
+++ b/ssh.c
@@ -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 &&
This page took 0.179688 seconds and 4 git commands to generate.