Commit d7a404bc authored by Leigh B Stoller's avatar Leigh B Stoller

Add noexport bit to prevent some (Windows) from URL export.

parent 1c3bbbb2
......@@ -1884,6 +1884,7 @@ CREATE TABLE `images` (
`metadata_url` tinytext,
`imagefile_url` tinytext,
`logfileid` varchar(40) default NULL,
`noexport` tinyint(1) NOT NULL default '0',
PRIMARY KEY (`imageid`),
UNIQUE KEY `pid` (`pid`,`imagename`),
KEY `gid` (`gid`),
......
#
# Add noexport flag to images.
#
use strict;
use libdb;
my $impotent = 0;
sub DoUpdate($$$)
{
my ($dbhandle, $dbname, $version) = @_;
if (!DBSlotExists("images", "noexport")) {
DBQueryFatal("alter table images add ".
" `noexport` tinyint(1) NOT NULL default '0'");
}
return 0;
}
# Local Variables:
# mode:perl
# End:
#!/usr/bin/perl -wT
#
# Copyright (c) 2000-2007 University of Utah and the Flux Group.
# Copyright (c) 2000-2013 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -190,6 +190,16 @@ sub SpewImage()
#
sub VerifyImage()
{
#
# Some images are not allowed to be exported.
#
if ($image->noexport()) {
if ($debug) {
print STDERR "Not allowed to export this image!\n";
}
return 1;
}
#
# The current user needs to be able to read the image file and must
# have provided proper access key.
......
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