diff options
author | Jay Sorg <jay.sorg@gmail.com> | 2017-07-09 15:23:13 -0700 |
---|---|---|
committer | metalefty <meta@vmeta.jp> | 2017-07-12 17:58:36 +0900 |
commit | b6bd8acef19763b1116bb4c881b46b0359c84f90 (patch) | |
tree | ba6d228f9dfa391618be5faea3839245eea9bd42 /sesman | |
parent | 9d36983ae743fa840e10deb8f73e49a74b9b3269 (diff) | |
download | xrdp-proprietary-b6bd8acef19763b1116bb4c881b46b0359c84f90.tar.gz xrdp-proprietary-b6bd8acef19763b1116bb4c881b46b0359c84f90.zip |
sesman: move auth_start_session, auth_stop_session, and auth_end to child process
Diffstat (limited to 'sesman')
-rw-r--r-- | sesman/session.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sesman/session.c b/sesman/session.c index 0b8bb6ac..f2dc087d 100644 --- a/sesman/session.c +++ b/sesman/session.c @@ -457,7 +457,6 @@ session_start_fork(tbus data, tui8 type, struct SCP_CONNECTION *c, return 0; } - auth_start_session(data, display); pid = g_fork(); /* parent is fork from tcp accept, child forks X and wm, then becomes scp */ @@ -466,6 +465,9 @@ session_start_fork(tbus data, tui8 type, struct SCP_CONNECTION *c, } else if (pid == 0) { + log_message(LOG_LEVEL_INFO, "calling auth_start_session from pid %d", + g_getpid()); + auth_start_session(data, display); g_delete_wait_obj(g_term_event); g_tcp_close(g_sck); g_tcp_close(c->in_sck); @@ -788,6 +790,10 @@ session_start_fork(tbus data, tui8 type, struct SCP_CONNECTION *c, g_waitpid(window_manager_pid); log_message(LOG_LEVEL_ALWAYS, "window manager (pid %d) did " "exit, cleaning up session", window_manager_pid); + log_message(LOG_LEVEL_INFO, "calling auth_stop_session and " + "auth_end from pid %d", g_getpid()); + auth_stop_session(data); + auth_end(data); g_sigterm(display_pid); g_sigterm(chansrv_pid); g_deinit(); @@ -917,8 +923,6 @@ session_kill(int pid) if (tmp->item->pid == pid) { - auth_stop_session(tmp->item->data); - auth_end(tmp->item->data); /* deleting the session */ log_message(LOG_LEVEL_INFO, "++ terminated session: username %s, display :%d.0, session_pid %d, ip %s", tmp->item->name, tmp->item->display, tmp->item->pid, tmp->item->client_ip); g_free(tmp->item); |