Commit f5ad4e30 authored by Robert Ricci's avatar Robert Ricci
Browse files

Added '-i /root/.ssh/identity' option to ssh, scp, etc. because $HOME is

not /root if we're setuid....

Also, set $< to 0 if $> is 0 - this seems to be necessary to stop sshtb
from dropping root permissions.
parent 2094770e
......@@ -9,14 +9,23 @@ my $net = "fxp";
my $pipe = 1;
my $DBOSID = "FBSD40-STD";
my $rsh = "sshtb -q";
my $ssh = "sshtb -q";
my $rcp = "scptb -q";
# Need to make sure we use the right identity file in case we're
# setuid root and $ENV{HOME} is wrong
my $identity = "-i /root/.ssh/identity";
my $rsh = "sshtb $identity -q";
my $ssh = "sshtb $identity -q";
my $rcp = "scptb $identity -q";
# Scrub environment
$ENV{PATH} = "/usr/testbed/bin:/bin:/usr/bin:/usr/local/bin";
delete @ENV{qw(IFS CDPATH ENV BASH_ENV)};
# Apparently ssh checks to see if ruid != euid, and sets eduid=ruid
# if so. So, let's let it see what it wants...
if ($> == 0) {
$< =0;
}
my %delaynodes = ();
my %delaylinks = ();
my %delayparams = ();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment