summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJay Sorg <jay.sorg@gmail.com>2012-07-16 13:25:34 -0700
committerJay Sorg <jay.sorg@gmail.com>2012-07-16 13:25:34 -0700
commitd8b8ca93b06be88836a491fa66b717272a090566 (patch)
tree850558188bf6190ded0b21dfe2730b9f42ea8469
parenta246fd582de861f3d4bb69ed2aa9fc47e1b7b441 (diff)
downloadxrdp-proprietary-d8b8ca93b06be88836a491fa66b717272a090566.tar.gz
xrdp-proprietary-d8b8ca93b06be88836a491fa66b717272a090566.zip
sesman: exit after fork if reconnectwm.sh does not exist
-rw-r--r--sesman/session.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sesman/session.c b/sesman/session.c
index 2ecdad63..b1720b6f 100644
--- a/sesman/session.c
+++ b/sesman/session.c
@@ -643,11 +643,12 @@ session_reconnect_fork(int display, char* username)
else if (pid == 0)
{
env_set_user(username, 0, display);
- g_sprintf(text, "%s/%s", XRDP_CFG_PATH, "reconnectwm.sh");
+ g_snprintf(text, 255, "%s/%s", XRDP_CFG_PATH, "reconnectwm.sh");
if (g_file_exist(text))
{
g_execlp3(text, g_cfg->default_wm, 0);
}
+ g_exit(0);
}
return display;
}