Commit a7984e38 authored by Robert Ricci's avatar Robert Ricci

Add libdb check for image access permissions - before, we were just

checking permissions to read the image file.
parent 15137f79
......@@ -56,7 +56,14 @@ if ($imageid =~ /^([-\@\w\+.]+)$/) {
# Grab the filename to give to frisbee
my $filename = &get_filename($imageid);
# Make sure that the user can read the image file or bomb out right now.
#
# Make sure that the user has sufficient permissions, and read the image file
# or bomb out right now.
#
if (!TBImageIDAccessCheck($UID,$imageid,TB_IMAGEID_ACCESS)) {
die("*** You do not have pemssion to load $imageid on nodes\n");
}
if (! -R $filename) {
die("*** You do not have permission to read the image file for\n".
"imageid $imageid: $filename\n");
......
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