Commit b3306efc authored by Leigh Stoller's avatar Leigh Stoller

Need to be root ($UID=0) to check if the image file exists in /proj.

parent fb26b140
...@@ -276,7 +276,10 @@ if ($getimage) { ...@@ -276,7 +276,10 @@ if ($getimage) {
fatal("Could not get the image lock after a long time"); fatal("Could not get the image lock after a long time");
} }
} }
# Run as root to access /proj
$EUID = $UID = 0;
if (! -e $image->path() || $newhash ne $image->hash() || $force) { if (! -e $image->path() || $newhash ne $image->hash() || $force) {
$EUID = $UID = $SAVEUID;
# #
# When updating an image ... # When updating an image ...
# #
...@@ -325,6 +328,7 @@ if ($getimage) { ...@@ -325,6 +328,7 @@ if ($getimage) {
$image->MarkUpdate($user); $image->MarkUpdate($user);
} }
} }
$EUID = $UID = $SAVEUID;
$image->Unlock(); $image->Unlock();
} }
exit(0); exit(0);
......
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