From e32d000dc82102483054855268bfd810f158bc06 Mon Sep 17 00:00:00 2001 From: Ian Geiser Date: Mon, 19 Jun 2017 14:34:16 -0400 Subject: [PATCH] Move the session creation inside of the child fork. This will allow sesman to only have the child as a part of the user's session scope^Cnd the parent remain part of the services scope. Signed-off-by: Ian Geiser --- sesman/session.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sesman/session.c b/sesman/session.c index 0b8bb6ac5..930e679d0 100644 --- a/sesman/session.c +++ b/sesman/session.c @@ -360,7 +360,7 @@ session_start_chansrv(char *username, int display) chansrv_pid = g_fork(); if (chansrv_pid == 0) { - chansrv_params = list_create(); + chansrv_params = list_create(); chansrv_params->auto_free = 1; /* building parameters */ @@ -457,7 +457,7 @@ 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 +466,7 @@ session_start_fork(tbus data, tui8 type, struct SCP_CONNECTION *c, } else if (pid == 0) { + auth_start_session(data, display); g_delete_wait_obj(g_term_event); g_tcp_close(g_sck); g_tcp_close(c->in_sck);