mirror of
https://github.com/webmin/webmin.git
synced 2026-03-20 08:40:24 +00:00
Use absolute path to the su command, if we have it
This commit is contained in:
@@ -10099,7 +10099,8 @@ if ($uinfo[8] ne "/bin/sh" && $uinfo[8] !~ /\/bash$/ && $env < 2) {
|
||||
$shellarg = " -m";
|
||||
}
|
||||
}
|
||||
my $rv = "su".($env == 1 || $env == 3 ? " -" : "").$shellarg.
|
||||
my $su = &has_command("su") || "su";
|
||||
my $rv = $su.($env == 1 || $env == 3 ? " -" : "").$shellarg.
|
||||
" ".quotemeta($user)." -c ".quotemeta(join(" ", @args));
|
||||
return $rv;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user