Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
b3306efc
Commit
b3306efc
authored
Dec 02, 2014
by
Leigh B Stoller
Browse files
Need to be root ($UID=0) to check if the image file exists in /proj.
parent
fb26b140
Changes
1
Hide whitespace changes
Inline
Side-by-side
utils/image_import.in
View file @
b3306efc
...
...
@@ -276,7 +276,10 @@ if ($getimage) {
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
)
{
$EUID
=
$UID
=
$SAVEUID
;
#
# When updating an image ...
#
...
...
@@ -325,6 +328,7 @@ if ($getimage) {
$image
->
MarkUpdate
(
$user
);
}
}
$EUID
=
$UID
=
$SAVEUID
;
$image
->
Unlock
();
}
exit
(
0
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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