Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
emulab-devel
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
143
Issues
143
List
Boards
Labels
Service Desk
Milestones
Merge Requests
6
Merge Requests
6
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
emulab
emulab-devel
Commits
5ff77c65
Commit
5ff77c65
authored
Apr 08, 2010
by
Leigh B Stoller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change RenewSlice() to return the new slice credential if it succeeds.
parent
a0eb0d9f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
2 deletions
+20
-2
protogeni/lib/GeniSA.pm.in
protogeni/lib/GeniSA.pm.in
+20
-2
No files found.
protogeni/lib/GeniSA.pm.in
View file @
5ff77c65
...
...
@@ -927,6 +927,12 @@ sub RenewSlice($)
return
GeniResponse
->
Create
(
GENIRESPONSE_FORBIDDEN
,
undef
,
"Insufficient privilege"
);
my
$
this_user
=
GeniUser
->
Lookup
($
credential
->
owner_uuid
(),
1
);
if
(
!defined($this_user)) {
return
GeniResponse
->
Create
(
GENIRESPONSE_FORBIDDEN
,
undef
,
"Who are you?"
);
}
#
#
Figure
out
new
expiration
time
;
this
is
the
time
at
which
we
can
#
idleswap
the
slice
out
.
...
...
@@ -962,9 +968,21 @@ sub RenewSlice($)
$
slice
->
UnLock
();
goto
bad
;
}
#
#
Return
a
credential
for
the
slice
.
#
my
$
slice_credential
=
GeniCredential
->
CreateSigned
($
slice
,
$
this_user
,
$
GeniCredential
::
LOCALSA_FLAG
);
if
(
!defined($slice_credential)) {
$
slice
->
UnLock
();
$
message
=
"Could not create new slice credential"
;
goto
bad
;
}
$
slice
->
UnLock
();
return
GeniResponse
->
Create
(
GENIRESPONSE_SUCCESS
);
return
GeniResponse
->
Create
(
GENIRESPONSE_SUCCESS
,
$
slice_credential
->
asString
());
bad
:
return
GeniResponse
->
Create
(
GENIRESPONSE_ERROR
,
undef
,
$
message
);
}
...
...
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