Commit a773a3c0 authored by Leigh B. Stoller's avatar Leigh B. Stoller

Checkpoint.

parent f506bd90
......@@ -25,13 +25,14 @@ all: protogeni-cm.pl protogeni-ch.pl protogeni-sa.pl Genixmlrpc.pm \
include $(TESTBED_SRCDIR)/GNUmakerules
install: $(INSTALL_DIR)/protogeni/xmlrpc/protogeni-sa.pl \
$(INSTALL_DIR)/protogeni/xmlrpc/protogeni-cm.pl \
$(INSTALL_DIR)/protogeni/xmlrpc/protogeni-ch.pl \
$(INSTALL_LIBDIR)/Genixmlrpc.pm \
install-libs: $(INSTALL_LIBDIR)/Genixmlrpc.pm \
$(INSTALL_LIBDIR)/GeniResponse.pm \
$(INSTALL_DIR)/opsdir/lib/Genixmlrpc.pm \
$(INSTALL_DIR)/opsdir/lib/GeniResponse.pm
install-scripts: $(INSTALL_DIR)/protogeni/xmlrpc/protogeni-sa.pl \
$(INSTALL_DIR)/protogeni/xmlrpc/protogeni-cm.pl \
$(INSTALL_DIR)/protogeni/xmlrpc/protogeni-ch.pl
$(SUDO) chown root $(INSTALL_DIR)/protogeni/xmlrpc/protogeni-sa.pl
$(SUDO) chmod u+s $(INSTALL_DIR)/protogeni/xmlrpc/protogeni-sa.pl
$(SUDO) chown root $(INSTALL_DIR)/protogeni/xmlrpc/protogeni-ch.pl
......@@ -39,6 +40,8 @@ install: $(INSTALL_DIR)/protogeni/xmlrpc/protogeni-sa.pl \
$(SUDO) chown root $(INSTALL_DIR)/protogeni/xmlrpc/protogeni-cm.pl
$(SUDO) chmod u+s $(INSTALL_DIR)/protogeni/xmlrpc/protogeni-cm.pl
install: install-libs install-scripts
control-install:
clean:
......
......@@ -70,11 +70,6 @@ sub Context($$;$$)
bless($self, $class);
return $self;
}
# accessors
sub field($$) { return ($_[0]->{$_[1]}); }
sub certificate($) { return field($_[0], "certificate"); }
sub keyfile($) { return field($_[0], "keyfile"); }
sub password($) { return field($_[0], "password"); }
#
# This is a context for a user. Used only on Emulab bossnode. Use the
......@@ -88,8 +83,19 @@ sub UserContext($$)
my $pkcs12 = $user->HomeDir() . "/.ssl/encrypted.p12";
$user->SSLPassPhrase(1, \$password);
return Genixmlrpc->Context($pkcs12, $pkcs12, $password);
my $self = {"certificate" => $pkcs12,
"keyfile" => $pkcs12,
"password" => $password,
"user" => $user};
bless($self, $class);
return $self;
}
# accessors
sub field($$) { return ($_[0]->{$_[1]}); }
sub certificate($) { return field($_[0], "certificate"); }
sub keyfile($) { return field($_[0], "keyfile"); }
sub password($) { return field($_[0], "password"); }
sub user($) { return field($_[0], "user"); }
#
# Context for making calls.
......
......@@ -119,11 +119,11 @@ my $responder = Frontier::Responder->new( "methods" => {
"Resolve" => \&GeniCM::Resolve,
"DiscoverResources" => \&GeniCM::DiscoverResources,
"GetTicket" => \&GeniCM::GetTicket,
"ReleaseTicket" => \&GeniCM::ReleaseTicket,
"RedeemTicket" => \&GeniCM::RedeemTicket,
"StartSliver" => \&GeniCM::StartSliver,
"DeleteSliver" => \&GeniCM::DeleteSliver,
"BindUser" => \&GeniCM::BindUser,
"UnBindUser" => \&GeniCM::UnBindUser,
"DeleteSlice" => \&GeniCM::DeleteSlice,
},
);
......@@ -134,7 +134,7 @@ my $response = $responder->{'_decode'}->serve($request,
# Terminate the log capture so that we can print the response to STDOUT
# for the web server.
#
#print STDERR "\n\n" . $response;
print STDERR "\n\n" . $response;
LogEnd();
......
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