Merge pull request #1120 from matt335672/set-env-on-reconnect
Copy the PAM session environment for the reconnect script
This commit is contained in:
commit
f83d967f46
@ -96,7 +96,7 @@ scp_v0_process(struct SCP_CONNECTION *c, struct SCP_SESSION *s)
|
|||||||
s_item->pid);
|
s_item->pid);
|
||||||
}
|
}
|
||||||
|
|
||||||
session_reconnect(display, s->username);
|
session_reconnect(display, s->username, data);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -860,7 +860,7 @@ session_start_fork(tbus data, tui8 type, struct SCP_CONNECTION *c,
|
|||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
/* called with the main thread */
|
/* called with the main thread */
|
||||||
static int
|
static int
|
||||||
session_reconnect_fork(int display, char *username)
|
session_reconnect_fork(int display, char *username, long data)
|
||||||
{
|
{
|
||||||
int pid;
|
int pid;
|
||||||
char text[256];
|
char text[256];
|
||||||
@ -877,6 +877,7 @@ session_reconnect_fork(int display, char *username)
|
|||||||
display,
|
display,
|
||||||
g_cfg->env_names,
|
g_cfg->env_names,
|
||||||
g_cfg->env_values);
|
g_cfg->env_values);
|
||||||
|
auth_set_env(data);
|
||||||
g_snprintf(text, 255, "%s/%s", XRDP_CFG_PATH, "reconnectwm.sh");
|
g_snprintf(text, 255, "%s/%s", XRDP_CFG_PATH, "reconnectwm.sh");
|
||||||
|
|
||||||
if (g_file_exist(text))
|
if (g_file_exist(text))
|
||||||
@ -904,9 +905,9 @@ session_start(long data, tui8 type, struct SCP_CONNECTION *c,
|
|||||||
/* called by a worker thread, ask the main thread to call session_sync_start
|
/* called by a worker thread, ask the main thread to call session_sync_start
|
||||||
and wait till done */
|
and wait till done */
|
||||||
int
|
int
|
||||||
session_reconnect(int display, char *username)
|
session_reconnect(int display, char *username, long data)
|
||||||
{
|
{
|
||||||
return session_reconnect_fork(display, username);
|
return session_reconnect_fork(display, username, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
@ -109,7 +109,7 @@ session_start(long data, tui8 type, struct SCP_CONNECTION *c,
|
|||||||
struct SCP_SESSION *s);
|
struct SCP_SESSION *s);
|
||||||
|
|
||||||
int
|
int
|
||||||
session_reconnect(int display, char* username);
|
session_reconnect(int display, char *username, long data);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user