Skip to content
GitLab
Menu
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
58e8ff58
Commit
58e8ff58
authored
Nov 14, 2014
by
Leigh B Stoller
Browse files
Bug fixes.
parent
9a8cf2f8
Changes
2
Hide whitespace changes
Inline
Side-by-side
apt/manage_instance.in
View file @
58e8ff58
...
...
@@ -111,15 +111,6 @@ if (defined($options{"d"})) {
if
(
@ARGV
<
2
)
{
usage
();
}
# The web interface (and in the future the xmlrpc interface) sets this.
my
$this_user
=
User
->
ImpliedUser
();
if
(
!
defined
(
$this_user
))
{
$this_user
=
User
->
ThisUser
();
if
(
!
defined
(
$this_user
))
{
fatal
("
You (
$UID
) do not exist!
");
}
}
my
$action
=
shift
(
@ARGV
);
my
$uuid
=
shift
(
@ARGV
);
my
$instance
=
APT_Instance
->
Lookup
(
$uuid
);
...
...
@@ -168,6 +159,15 @@ sub DoSnapshot()
if
(
!
defined
(
$slice
))
{
fatal
("
No slice for quick VM:
$uuid
");
}
# The web interface (and in the future the xmlrpc interface) sets this.
my
$this_user
=
User
->
ImpliedUser
();
if
(
!
defined
(
$this_user
))
{
$this_user
=
User
->
ThisUser
();
if
(
!
defined
(
$this_user
))
{
fatal
("
You (
$UID
) do not exist!
");
}
}
#
# If we get an imagename on the command line, the caller is
...
...
www/aptui/status.php
View file @
58e8ff58
...
...
@@ -132,8 +132,14 @@ $canclone = (($profile->published() && isset($this_user) &&
$snapping
=
0
;
$oneonly
=
(
isset
(
$oneonly
)
&&
$oneonly
?
1
:
0
);
$isadmin
=
(
ISADMIN
()
?
1
:
0
);
$dossh
=
(
isset
(
$this_user
)
&&
$this_user
->
SameUser
(
$creator
)
?
1
:
0
);
#
# We give ssh to the creator (real user or guest user).
#
$dossh
=
(((
isset
(
$this_user
)
&&
$this_user
->
SameUser
(
$creator
))
||
(
isset
(
$_COOKIE
[
'quickvm_user'
])
&&
$_COOKIE
[
'quickvm_user'
]
==
$creator
->
uuid
()))
?
1
:
0
);
#
# See if we have a task running in the background for this instance.
...
...
Write
Preview
Supports
Markdown
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