Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emulab
emulab-devel
Commits
f0cc7c1c
Commit
f0cc7c1c
authored
Jul 08, 2014
by
Leigh B Stoller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes for local user who use the same name as their guest id.
parent
33f4a831
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
7 deletions
+15
-7
protogeni/scripts/quickvm.in
protogeni/scripts/quickvm.in
+15
-7
No files found.
protogeni/scripts/quickvm.in
View file @
f0cc7c1c
...
...
@@ -52,7 +52,7 @@ my $verbose = 1;
my
$killit
=
0
;
my
$utahddc
=
1
;
my
$DDCURN
=
"
urn:publicid:IDN+utahddc.geniracks.net+authority+cm
";
my
$localuser
=
0
;
;
my
$localuser
=
0
;
my
$xmlfile
;
my
$extend
;
my
$webtask
;
...
...
@@ -360,16 +360,26 @@ chomp($sshkey)
# have to create an ssl certificate (which the user will never see)
# so that we can operate on behalf of the user (via speaksfor).
#
my
$geniuser
=
GeniUser
->
Lookup
(
$user_urn
,
$localuser
);
if
(
!
defined
(
$geniuser
))
{
# Note that we want to check for the user local account ahead of
# SA account, to bypass their guest account that might still be
# in the table.
#
my
$geniuser
;
if
(
$localuser
)
{
$geniuser
=
GeniUser::
LocalUser
->
Lookup
(
$user_uid
);
}
else
{
$geniuser
=
GeniUser
->
Lookup
(
$user_urn
);
#
# In Utah, check for alternate SA
#
if
(
$MAINSITE
)
{
if
(
!
defined
(
$geniuser
)
&&
$MAINSITE
)
{
$user_urn
=
GeniHRN::
Generate
("
aptlab.net
",
"
user
",
$user_uid
);
$user_hrn
=
"
aptlab.
${user_uid}
";
$geniuser
=
GeniUser
->
Lookup
(
$user_urn
,
0
);
}
$geniuser
=
GeniUser
->
Lookup
(
$user_urn
,
0
);
}
if
(
!
defined
(
$geniuser
))
{
if
(
$localuser
)
{
...
...
@@ -420,8 +430,6 @@ if (!defined($geniuser)) {
my
$user_uuid
=
$geniuser
->
uuid
();
# So we know this user has dome something lately.
$geniuser
->
BumpActivity
();
# We get the -l flag on initial create only.
$localuser
=
(
$geniuser
->
IsLocal
()
?
1
:
0
);
#
# Guest users use the apt CA, and so we must sign the speaksfor
...
...
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