/usr/share/usermin/fetchmail/check.cgi (1605B)
\n"; print "
";
if ($< == 0) {
# For webmin, switch to the user
if ($in{'user'} ne 'root') {
$cmd = &command_as_user($in{'user'}, 0, $cmd)
}
open(CMD, "$cmd 2>&1 |");
&additional_log("exec", undef, "su '$in{'user'}' -c '$cmd'");
}
else {
# For usermin, which has already switched
open(CMD, "$cmd 2>&1 |");
}
while() {
print &html_escape($_);
}
close(CMD);
print " \n";
if ($? > 256) { print "$text{'check_failed'} \n"; } else { print "$text{'check_ok'}
\n"; } &webmin_log("check", defined($in{'idx'}) ? "server" : "file", $config{'config_file'} ? $file : $in{'user'}, $poll); if (!$fetchmail_config && $config{'view_mode'}) { &ui_print_footer("edit_user.cgi?user=$in{'user'}", $text{'user_return'}, "", $text{'index_return'}); } else { &ui_print_footer("", $text{'index_return'}); }