mirror of
https://github.com/webmin/webmin.git
synced 2026-05-04 22:30:33 +01:00
Fix bug parsing menu files on remote system
This commit is contained in:
@@ -376,13 +376,13 @@ for($i=0; defined($name = $in{"name_$i"}); $i++) {
|
||||
}
|
||||
}
|
||||
|
||||
# set_parameter_envs(&command, command-str, &uinfo, [set-in])
|
||||
# set_parameter_envs(&command, command-str, &uinfo, [set-in], [skip-menu-check])
|
||||
# Sets $ENV variables based on parameter inputs, and returns the list of
|
||||
# environment variable commands, the export commands, the command string,
|
||||
# and the command string to display.
|
||||
sub set_parameter_envs
|
||||
{
|
||||
local ($cmd, $str, $uinfo, $setin) = @_;
|
||||
local ($cmd, $str, $uinfo, $setin, $skipfound) = @_;
|
||||
$setin ||= \%in;
|
||||
local $displaystr = $str;
|
||||
local ($env, $export, @vals);
|
||||
@@ -414,7 +414,7 @@ foreach my $a (@{$cmd->{'args'}}) {
|
||||
foreach my $l (&read_opts_file($a->{'opts'})) {
|
||||
$found++ if ($l->[0] eq $setin->{$n});
|
||||
}
|
||||
$found || &error($text{'run_eopt'});
|
||||
$found || $skipfound || &error($text{'run_eopt'});
|
||||
$rv = $setin->{$n};
|
||||
}
|
||||
elsif ($a->{'type'} == 10) {
|
||||
@@ -439,7 +439,7 @@ foreach my $a (@{$cmd->{'args'}}) {
|
||||
foreach my $l (@opts) {
|
||||
$found++ if ($l->[0] eq $v);
|
||||
}
|
||||
$found || &error($text{'run_eopt'});
|
||||
$found || $skipfound || &error($text{'run_eopt'});
|
||||
}
|
||||
$rv = join(" ", @vals);
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ foreach $h (@hosts) {
|
||||
"custom-lib.pl");
|
||||
&remote_foreign_call($server->{'host'}, "custom",
|
||||
"set_parameter_envs", $cmd, $cmd->{'cmd'},
|
||||
\@user_info, \%in);
|
||||
\@user_info, \%in, 1);
|
||||
($got, $out, $timeout) = &remote_foreign_call(
|
||||
$server->{'host'}, "custom", "execute_custom_command",
|
||||
$cmd, $env, $export, $str);
|
||||
|
||||
Reference in New Issue
Block a user