Commit 1ba1d3db authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

If an admin type, then use the pid of the target project in the suexec

so that admins can vis any experiment (that is, have access to the
exp directory in the /proj/pid tree). Eventually we want a standalone
top file generator.
parent 5d653693
......@@ -42,10 +42,20 @@ if (! TBExptAccessCheck($uid, $exp_pid, $exp_eid, $TB_EXPT_READINFO)) {
USERERROR("You do not have permission to view experiment $exp_eid!", 1);
# XXX If an admin type, then use an appropriate gid so that we can get
# get to the top file. This needs more thought.
$gid = "nobody";
if (ISADMIN($uid)) {
$gid = $exp_pid;
# Spit out the image with a content header.
if ($fp = popen("$TBSUEXEC_PATH $uid nobody webvistopology $pid $eid", "r")) {
if ($fp = popen("$TBSUEXEC_PATH $uid $gid webvistopology $pid $eid", "r")) {
header("Content-type: image/gif");
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment