Commit e5e6aa74 authored by Leigh Stoller's avatar Leigh Stoller

Call addkeys() with the creator of the slice, not the caller of addkeys.

parent 218b0c5a
......@@ -2274,19 +2274,16 @@ sub BindToSlice($)
return GeniResponse->Create(GENIRESPONSE_FORBIDDEN(), undef,
"Credential does not match the URN");
}
#
# Find or create the user.
#
my $user = GeniCM::CreateUserFromCertificate($credential);
return $user
if (GeniResponse::IsResponse($user));
my $creator = GeniUser->Lookup($slice->creator_uuid(), 1);
if (!defined($creator)) {
return GeniResponse->Create(GENIRESPONSE_ERROR(), undef,
"Could not lookup slice creator");
}
if ($slice->Lock() != 0) {
return GeniResponse->BusyResponse();
}
if (defined($keys)) {
my $response = GeniCM::AddKeys($slice, $user, $keys);
my $response = GeniCM::AddKeys($slice, $creator, $keys);
if (GeniResponse::IsResponse($response)) {
$slice->UnLock();
return $response;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment