}
# safe_process_exec(command, uid, gid, handle, [input], [fixtags], [bsmode],
-# [timeout])
+# [timeout], [safe])
# Executes the given command as the given user/group and writes all output
# to the given file handle. Finishes when there is no more output or the
# process stops running. Returns the number of bytes read.
sub safe_process_exec
{
-if (&is_readonly_mode()) {
+if (&is_readonly_mode() && !$_[8]) {
# Veto command in readonly mode
return 0;
}
$cat = "(".join(" ; ", @cats).")";
$got = &foreign_call("proc", "safe_process_exec",
"$cat | grep -i $filter | $tailcmd",
- 0, 0, STDOUT, undef, 1);
+ 0, 0, STDOUT, undef, 1, 0, undef, 1);
} else {
# Not filtering .. so cat the most recent non-empty file
if ($cmd) {
}
$got = &foreign_call("proc", "safe_process_exec",
$catter." | $tailcmd",
- 0, 0, STDOUT, undef, 1);
+ 0, 0, STDOUT, undef, 1, 0, undef, 1);
}
print "<i>$text{'view_empty'}</i>\n" if (!$got);
print "</pre>\n";