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
5f65c653
Commit
5f65c653
authored
Feb 29, 2016
by
Leigh B Stoller
Browse files
Kill some obsolete code.
parent
780443b9
Changes
1
Hide whitespace changes
Inline
Side-by-side
apt/create_instance.in
View file @
5f65c653
...
...
@@ -67,7 +67,6 @@ sub SnapShot($$$);
sub
CreateDatasetCreds
($$$$$);
sub
CreateSlivers
();
sub
RunStitcher
();
sub
GetSSHKeys
($$$);
#
# Configure variables
...
...
@@ -396,7 +395,7 @@ if ($localuser) {
$emulab_user
->
GenEncryptedCert
())
{
fatal
("
Could not (re)generate encrypted certificate
");
}
# Now this will work; without a certificate,
this
would fail.
# Now this will work; without a certificate,
above line
would fail.
if
(
defined
(
$emulab_user
))
{
$geniuser
=
GeniUser::
LocalUser
->
Create
(
$emulab_user
);
}
...
...
@@ -1642,73 +1641,6 @@ sub RunStitcher()
return
$errcode
;
}
#
# Build a set of sshkeys.
#
sub GetSSHKeys($$$)
{
my (
$geniuser
,
$project
,
$pref
) =
@_
;
my
$rval
;
my
@keys
;
if (
$geniuser
->GetKeyBundle(
\
@keys
, 1) < 0 || !
@keys
) {
print STDERR "No ssh keys for
$geniuser
\n
";
return -1;
}
#
# CM format.
#
$rval
= [{'urn' =>
$geniuser
->urn(),
'login' =>
$geniuser
->uid(),
'keys' => [
@keys
]
}];
if (! (
$project
->pid() eq
$APT_HOLDINGPROJECT
||
$project
->pid() eq
$CLOUD_HOLDINGPROJECT
)) {
#
# Get other users from the project. Real local users are easy,
# nonlocal users from the GPO portal are messy.
#
my
@members
;
if (
$project
->GetProjectGroup()->MemberList(
\
@members
)) {
print STDERR "Error getting memberlist for
$project
\n
";
}
else {
foreach my
$member
(
@members
) {
next
if (
$member
->SameUser(
$geniuser
->emulab_user()));
my
$guser
= GeniUser->CreateFromLocal(
$member
);
next
if (!defined(
$guser
));
#
# So, users coming in from the trusted signer have their keys
# at their home portal. We download those keys whenever they
# log in, and cache them in their local stub account, but they
# could be out of date. But in order to refresh those keys, we
# would need a valid (not expired) speaks-for credential, which
# we might have, but typically not since they have short expire
# times. So, lets not worry about this right now, just use the
# cached keys and see who complains.
#
@keys
= ();
if (
$guser
->GetKeyBundle(
\
@keys
, 1) < 0 || !
@keys
) {
print STDERR "No ssh keys for
$guser
\n
";
next;
}
push(
@{
$
rval}
, {'urn' =>
$guser
->urn(),
'login' =>
$guser
->uid(),
'keys' => [
@keys
]
});
}
}
}
$
$pref
=
$rval
;
return 0;
}
sub fatal($) {
my (
$mesg
) =
$_
[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