mirror of
https://github.com/webmin/webmin.git
synced 2026-02-03 14:13:29 +00:00
Always log command run via execute_command
This commit is contained in:
@@ -7764,6 +7764,7 @@ if (&is_readonly_mode() && !$safe) {
|
||||
$cmd = &translate_command($cmd);
|
||||
|
||||
# Use ` operator where possible
|
||||
&webmin_debug_log('CMD', "cmd=$cmd") if ($gconfig{'debug_what_cmd'});
|
||||
if (!$stdin && ref($stdout) && !$stderr) {
|
||||
$cmd = "($cmd)" if ($gconfig{'os_type'} ne 'windows');
|
||||
$$stdout = `$cmd 2>$null_file`;
|
||||
@@ -7778,7 +7779,6 @@ elsif (!$stdin && !$stdout && !$stderr) {
|
||||
$cmd = "($cmd)" if ($gconfig{'os_type'} ne 'windows');
|
||||
return system("$cmd >$null_file 2>$null_file <$null_file");
|
||||
}
|
||||
&webmin_debug_log('CMD', "cmd=$cmd") if ($gconfig{'debug_what_cmd'});
|
||||
|
||||
# Setup pipes
|
||||
$| = 1; # needed on some systems to flush before forking
|
||||
|
||||
Reference in New Issue
Block a user