First attempt at Kerberos support for the XGrid process starter
refs trac:345 This commit was SVN r11812. The following Trac tickets were found above: Ticket 345 --> https://svn.open-mpi.org/trac/ompi/ticket/345
Этот коммит содержится в:
родитель
9733c8e3bd
Коммит
d8d55a760f
@ -44,7 +44,6 @@
|
||||
opal_mutex_t state_mutex;
|
||||
|
||||
XGConnection *connection;
|
||||
XGTwoWayRandomAuthenticator *authenticator;
|
||||
XGController *controller;
|
||||
XGGrid *grid;
|
||||
int cleanup;
|
||||
@ -68,6 +67,8 @@
|
||||
-(void) setControllerHostnameAsCString: (char*) password;
|
||||
-(void) setCleanUp: (int) val;
|
||||
|
||||
-(NSString*)servicePrincipal;
|
||||
|
||||
/* interface for launch */
|
||||
-(int) connect;
|
||||
-(int) launchJob:(orte_jobid_t) jobid;
|
||||
|
@ -144,20 +144,41 @@ char **environ;
|
||||
}
|
||||
|
||||
|
||||
- (NSString *)servicePrincipal;
|
||||
{
|
||||
NSString *servicePrincipal = [connection servicePrincipal];
|
||||
|
||||
if (servicePrincipal == nil) [NSString stringWithFormat:@"xgrid/%@", [connection name]];
|
||||
|
||||
return servicePrincipal;
|
||||
}
|
||||
|
||||
|
||||
/* interface for launch */
|
||||
-(int) connect
|
||||
{
|
||||
connection = [[[XGConnection alloc] initWithHostname: controller_hostname
|
||||
portnumber:0] autorelease];
|
||||
authenticator = [[[XGTwoWayRandomAuthenticator alloc] init] autorelease];
|
||||
|
||||
/* this seems to be hard coded */
|
||||
[authenticator setUsername:@"one-xgrid-client"];
|
||||
[authenticator setPassword:controller_password];
|
||||
if (NULL == controller_password) {
|
||||
XGGSSAuthenticator *authenticator =
|
||||
[[[XGGSSAuthenticator alloc] init] autorelease];
|
||||
|
||||
[authenticator setServicePrincipal:[self servicePrincipal]];
|
||||
[connection setAuthenticator:authenticator];
|
||||
|
||||
} else {
|
||||
XGTwoWayRandomAuthenticator *authenticator =
|
||||
[[[XGTwoWayRandomAuthenticator alloc] init] autorelease];
|
||||
|
||||
/* this seems to be hard coded */
|
||||
[authenticator setUsername:@"one-xgrid-client"];
|
||||
[authenticator setPassword:controller_password];
|
||||
|
||||
[connection setAuthenticator:authenticator];
|
||||
[connection setAuthenticator:authenticator];
|
||||
}
|
||||
[connection setDelegate: self];
|
||||
|
||||
|
||||
/* get us connected */
|
||||
opal_mutex_lock(&state_mutex);
|
||||
[connection open];
|
||||
|
@ -137,8 +137,7 @@ orte_pls_xgrid_component_init(int *priority)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (NULL == getenv("XGRID_CONTROLLER_HOSTNAME") ||
|
||||
NULL == getenv("XGRID_CONTROLLER_PASSWORD")) {
|
||||
if (NULL == getenv("XGRID_CONTROLLER_HOSTNAME")) {
|
||||
opal_output(orte_pls_base.pls_output,
|
||||
"orte:pls:xgrid: not available: controller info not set");
|
||||
return NULL;
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user