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
69002f5a
Commit
69002f5a
authored
Aug 02, 2011
by
Leigh B Stoller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Watch for a local user that has been frozen; refuse service.
parent
c3b1e225
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
1 deletion
+23
-1
protogeni/xmlrpc/protogeni-wrapper.pl.in
protogeni/xmlrpc/protogeni-wrapper.pl.in
+23
-1
No files found.
protogeni/xmlrpc/protogeni-wrapper.pl.in
View file @
69002f5a
...
...
@@ -55,9 +55,11 @@ use vars qw($EMULAB_PEMFILE $GENI_METHODS $GENI_VERSION
use
lib
'
@prefix@/lib
';
use
Genixmlrpc
;
use
GeniResponse
;
use
GeniHRN
;
use
libaudit
;
use
libEmulab
;
use
libtestbed
;
use
User
;
# Geniuser.
my
$user
=
"
geniuser
";
...
...
@@ -194,7 +196,27 @@ if (exists($ENV{'SSL_CLIENT_CERT'})) {
}
XMLError
(
XMLRPC_APPLICATION_ERROR
(),
"
Invalid authentication certificate; no URN. Please regenerate.
")
if
(
!
exists
(
$ENV
{'
GENIURN
'}));
if
(
!
(
defined
(
$GENIURN
)
&&
GeniHRN::
IsValid
(
$GENIURN
)));
#
# Lets make sure that local users do not get past here if their account
# has been frozen. Their SSL certificate is still valid of course. We
# probably want to also add a check for non-local users, but that needs
# more thought.
#
my
(
$authority
,
$type
,
$id
)
=
GeniHRN::
Parse
(
$GENIURN
);
if
(
$type
eq
"
user
"
&&
GeniHRN::
Authoritative
(
$GENIURN
,
"
@OURDOMAIN
@
"))
{
#
# Check Emulab users table.
#
my
$user
=
User
->
Lookup
(
$id
);
XMLError
(
XMLRPC_APPLICATION_ERROR
(),
"
Not a valid local user. Who are you really?
")
if
(
!
defined
(
$user
));
XMLError
(
XMLRPC_APPLICATION_ERROR
(),
"
Your account is no longer active!
")
if
(
$user
->
status
()
ne
"
active
");
}
#
# Reaching into the Frontier code so I can debug this crap.
...
...
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