*/
protected RemoteAccount createGsiAccount(String host, int port, String zone,
GSSCredential credential, String homeDir,
String defaultStorageResource)
{
SRBAccount srb = null;
if (homeDir != null && defaultStorageResource != null) {
log.debug("Create SRBAccount using GSI with homeDir and storageResource");
srb = new SRBAccount(host, port, credential, homeDir,
defaultStorageResource, SRBAccount.GSI_AUTH);
} else if(defaultStorageResource != null){
// uses special constructor that sets GSI_AUTH and
// implements a login procedure using the 'ticketuser' in
// order to get the users home directory
srb = new SRBAccount(host, port, credential);
}
if (defaultStorageResource != null) {
srb.setDefaultStorageResource(defaultStorageResource);
}
return srb;
}