Readonly mode fixes

This commit is contained in:
Jamie Cameron
2007-12-19 06:27:12 +00:00
parent b49385d6a4
commit 270bcfd5c2
2 changed files with 4 additions and 4 deletions

View File

@@ -107,13 +107,13 @@ elsif ($access{'uid'}) {
}
# 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;
}

View File

@@ -92,7 +92,7 @@ elsif ($in{'view'}) {
$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) {
@@ -115,7 +115,7 @@ elsif ($in{'view'}) {
}
$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";