|
|
@ -507,7 +507,7 @@ wait_for_remote_hostname(char* username)
|
|
|
|
/* wait up to 5 secs for hostname to appear */
|
|
|
|
/* wait up to 5 secs for hostname to appear */
|
|
|
|
i = 0;
|
|
|
|
i = 0;
|
|
|
|
const char * hostname = raptor_sm_get_hostname_for_username(username, false);
|
|
|
|
const char * hostname = raptor_sm_get_hostname_for_username(username, false);
|
|
|
|
while (strcmp(hostname, "") == 0)
|
|
|
|
while ((strcmp(hostname, "") == 0) || (strcmp(hostname, "ERROR") == 0))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
g_free(hostname);
|
|
|
|
g_free(hostname);
|
|
|
|
hostname = raptor_sm_get_hostname_for_username(username, false);
|
|
|
|
hostname = raptor_sm_get_hostname_for_username(username, false);
|
|
|
@ -682,14 +682,22 @@ session_start_fork(tbus data, tui8 type, struct SCP_CONNECTION *c,
|
|
|
|
else if (window_manager_pid == 0)
|
|
|
|
else if (window_manager_pid == 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
char* remote_server = wait_for_remote_hostname(s->username);
|
|
|
|
char* remote_server = wait_for_remote_hostname(s->username);
|
|
|
|
wait_for_remote_xserver(remote_server, display);
|
|
|
|
if ((strcmp(remote_server, "") == 0) || (strcmp(remote_server, "ERROR") == 0))
|
|
|
|
env_set_user(s->username,
|
|
|
|
{
|
|
|
|
0,
|
|
|
|
g_free(remote_server);
|
|
|
|
display,
|
|
|
|
remote_server = NULL;
|
|
|
|
g_cfg->env_names,
|
|
|
|
log_message(LOG_LEVEL_ERROR, "Unable to find available node for specified user / group. Check group mappings in database?\n");
|
|
|
|
g_cfg->env_values);
|
|
|
|
}
|
|
|
|
|
|
|
|
else {
|
|
|
|
if (x_server_running_check_remote_ports(remote_server, display))
|
|
|
|
wait_for_remote_xserver(remote_server, display);
|
|
|
|
|
|
|
|
env_set_user(s->username,
|
|
|
|
|
|
|
|
0,
|
|
|
|
|
|
|
|
display,
|
|
|
|
|
|
|
|
g_cfg->env_names,
|
|
|
|
|
|
|
|
g_cfg->env_values);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (remote_server && x_server_running_check_remote_ports(remote_server, display))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
g_free(remote_server);
|
|
|
|
g_free(remote_server);
|
|
|
|
|
|
|
|
|
|
|
@ -788,7 +796,10 @@ session_start_fork(tbus data, tui8 type, struct SCP_CONNECTION *c,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
g_free(remote_server);
|
|
|
|
if (remote_server)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
g_free(remote_server);
|
|
|
|
|
|
|
|
}
|
|
|
|
log_message(LOG_LEVEL_ERROR, "another Xserver might "
|
|
|
|
log_message(LOG_LEVEL_ERROR, "another Xserver might "
|
|
|
|
"already be active on display %d - see log", display);
|
|
|
|
"already be active on display %d - see log", display);
|
|
|
|
}
|
|
|
|
}
|
|
|
|