Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
emulab-devel
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
143
Issues
143
List
Boards
Labels
Service Desk
Milestones
Merge Requests
6
Merge Requests
6
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
emulab
emulab-devel
Commits
d7a404bc
Commit
d7a404bc
authored
Jun 28, 2013
by
Leigh B Stoller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add noexport bit to prevent some (Windows) from URL export.
parent
1c3bbbb2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
1 deletion
+34
-1
sql/database-create.sql
sql/database-create.sql
+1
-0
sql/updates/4/360
sql/updates/4/360
+22
-0
utils/spewimage.in
utils/spewimage.in
+11
-1
No files found.
sql/database-create.sql
View file @
d7a404bc
...
...
@@ -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`
),
...
...
sql/updates/4/360
0 → 100644
View file @
d7a404bc
#
# 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:
utils/spewimage.in
View file @
d7a404bc
#!/usr/bin/perl -wT
#
# Copyright (c) 2000-20
07
University of Utah and the Flux Group.
# Copyright (c) 2000-20
13
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.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment