diff options
author | matt335672 <30179339+matt335672@users.noreply.github.com> | 2018-05-31 10:30:11 +0100 |
---|---|---|
committer | matt335672 <30179339+matt335672@users.noreply.github.com> | 2018-05-31 10:54:38 +0100 |
commit | cde5b0912907a279e4a2e1694690d308b318fc12 (patch) | |
tree | 8cb380847e14cb56f6aa0cbd6b1e8665e587a53f /sesman | |
parent | 57015aa08862d6e7d21a04ecb6fbfde3c2cc79fd (diff) | |
download | xrdp-proprietary-cde5b0912907a279e4a2e1694690d308b318fc12.tar.gz xrdp-proprietary-cde5b0912907a279e4a2e1694690d308b318fc12.zip |
Copy the PAM session environment for the reconnect script
This provides access to variables set at login which may be
required by the script (e.g. KRB5CCNAME)
Diffstat (limited to 'sesman')
-rw-r--r-- | sesman/scp_v0.c | 2 | ||||
-rw-r--r-- | sesman/session.c | 7 | ||||
-rw-r--r-- | sesman/session.h | 2 |
3 files changed, 6 insertions, 5 deletions
diff --git a/sesman/scp_v0.c b/sesman/scp_v0.c index de00068b..cc3712cc 100644 --- a/sesman/scp_v0.c +++ b/sesman/scp_v0.c @@ -96,7 +96,7 @@ scp_v0_process(struct SCP_CONNECTION *c, struct SCP_SESSION *s) s_item->pid); } - session_reconnect(display, s->username); + session_reconnect(display, s->username, data); } else { diff --git a/sesman/session.c b/sesman/session.c index 0a80bd8a..d33f2f5f 100644 --- a/sesman/session.c +++ b/sesman/session.c @@ -860,7 +860,7 @@ session_start_fork(tbus data, tui8 type, struct SCP_CONNECTION *c, /******************************************************************************/ /* called with the main thread */ static int -session_reconnect_fork(int display, char *username) +session_reconnect_fork(int display, char *username, long data) { int pid; char text[256]; @@ -877,6 +877,7 @@ session_reconnect_fork(int display, char *username) display, g_cfg->env_names, g_cfg->env_values); + auth_set_env(data); g_snprintf(text, 255, "%s/%s", XRDP_CFG_PATH, "reconnectwm.sh"); 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 and wait till done */ 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); } /******************************************************************************/ diff --git a/sesman/session.h b/sesman/session.h index 10cd4d57..42d747cb 100644 --- a/sesman/session.h +++ b/sesman/session.h @@ -109,7 +109,7 @@ session_start(long data, tui8 type, struct SCP_CONNECTION *c, struct SCP_SESSION *s); int -session_reconnect(int display, char* username); +session_reconnect(int display, char *username, long data); /** * |