version 1.25, 1999/10/26 22:38:51 |
version 1.26, 1999/10/28 21:29:26 |
|
|
} |
} |
|
|
/* Disable rhosts authentication if not running as root. */ |
/* 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_authentication = 0; |
options.rhosts_rsa_authentication = 0; |
options.rhosts_rsa_authentication = 0; |
|
|
restore_uid(); |
restore_uid(); |
|
|
/* Open a connection to the remote host. This needs root privileges if |
/* Open a connection to the remote host. This needs root privileges if |
rhosts_{rsa_}authentication is true. */ |
rhosts_{rsa_}authentication is enabled. */ |
|
|
if (!options.use_privileged_port) |
|
{ |
|
options.rhosts_authentication = 0; |
|
options.rhosts_rsa_authentication = 0; |
|
} |
|
|
|
ok = ssh_connect(host, &hostaddr, options.port, options.connection_attempts, |
ok = ssh_connect(host, &hostaddr, options.port, options.connection_attempts, |
!options.rhosts_authentication && |
!options.rhosts_authentication && |