diff options
author | ilsimo <ilsimo> | 2007-09-17 15:28:51 +0000 |
---|---|---|
committer | ilsimo <ilsimo> | 2007-09-17 15:28:51 +0000 |
commit | f06f9591bccd8ddd900c6d6ce2b168818f5745db (patch) | |
tree | c40459c95a70b8eda8a1ee65142fa343ada7db96 /sesman/session.c | |
parent | 8c3d20c3d56e745e017e347b4317ae0e036d7674 (diff) | |
download | xrdp-proprietary-f06f9591bccd8ddd900c6d6ce2b168818f5745db.tar.gz xrdp-proprietary-f06f9591bccd8ddd900c6d6ce2b168818f5745db.zip |
fixing sessvc starting code and removing SESMAN_SESSVC_FILE definition
Diffstat (limited to 'sesman/session.c')
-rw-r--r-- | sesman/session.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/sesman/session.c b/sesman/session.c index 868d82cc..697d261f 100644 --- a/sesman/session.c +++ b/sesman/session.c @@ -117,6 +117,8 @@ session_start_sessvc(int xpid, int wmpid, long data) struct list* sessvc_params; char wmpid_str[25]; char xpid_str[25]; + char exe_path[262]; + char cur_dir[256]; int i; /* new style waiting for clients */ @@ -128,12 +130,16 @@ session_start_sessvc(int xpid, int wmpid, long data) sessvc_params->auto_free = 1; /* building parameters */ - list_add_item(sessvc_params, (long)g_strdup(SESMAN_SESSVC_FILE)); + g_get_current_dir(cur_dir, 255); + g_snprintf(exe_path, 261, "%s/%s", cur_dir, "sessvc"); + + list_add_item(sessvc_params, (long)g_strdup(exe_path)); list_add_item(sessvc_params, (long)g_strdup(xpid_str)); list_add_item(sessvc_params, (long)g_strdup(wmpid_str)); list_add_item(sessvc_params, 0); /* mandatory */ - g_execvp(SESMAN_SESSVC_FILE, ((char**)sessvc_params->items)); + /* executing sessvc */ + g_execvp(exe_path, ((char**)sessvc_params->items)); /* should not get here */ log_message(LOG_LEVEL_ALWAYS, "error starting sessvc - pid %d - xpid=%s - wmpid=%s", @@ -285,7 +291,7 @@ for user %s denied", username); /* still a problem starting window manager just start xterm */ g_execlp3("xterm", "xterm", 0); - + /* should not get here */ log_message(LOG_LEVEL_ALWAYS,"error starting xterm for user %s - pid %d", username, g_getpid()); |