diff --git a/common/os_calls.c b/common/os_calls.c index dbbfdbc2..1ce05924 100644 --- a/common/os_calls.c +++ b/common/os_calls.c @@ -133,7 +133,7 @@ g_rm_temp_dir(void) /*****************************************************************************/ int -g_mk_socket_path(const char *app_name) +g_mk_socket_path(void) { if (!g_directory_exist(XRDP_SOCKET_PATH)) { @@ -176,8 +176,6 @@ g_init(const char *app_name) /* use en_US.UTF-8 instead if not available */ setlocale(LC_CTYPE, "en_US.UTF-8"); } - - g_mk_socket_path(app_name); } /*****************************************************************************/ @@ -2881,7 +2879,6 @@ g_execlp3(const char *a1, const char *a2, const char *a3) "returned errno: %d, description: %s", a1, args_str, g_get_errno(), g_get_strerror()); - g_mk_socket_path(0); return rv; #endif } @@ -2991,11 +2988,7 @@ g_fork(void) rv = fork(); - if (rv == 0) /* child */ - { - g_mk_socket_path(0); - } - else if (rv == -1) /* error */ + if (rv == -1) /* error */ { LOG(LOG_LEVEL_ERROR, "Process fork failed with errno: %d, description: %s", diff --git a/common/os_calls.h b/common/os_calls.h index 33b8eeef..dcf4eb33 100644 --- a/common/os_calls.h +++ b/common/os_calls.h @@ -53,7 +53,7 @@ struct list; #define g_close_wait_obj g_delete_wait_obj int g_rm_temp_dir(void); -int g_mk_socket_path(const char *app_name); +int g_mk_socket_path(void); void g_init(const char *app_name); void g_deinit(void); void g_printf(const char *format, ...) printflike(1, 2); diff --git a/sesman/env.c b/sesman/env.c index 31ae1292..5e019299 100644 --- a/sesman/env.c +++ b/sesman/env.c @@ -138,8 +138,6 @@ env_set_user(int uid, char **passwd_file, int display, g_setenv("PATH", "/sbin:/bin:/usr/bin:/usr/local/bin", 1); } #endif - g_mk_socket_path(0); - if (error == 0) { g_setenv("SHELL", pw_shell, 1); diff --git a/sesman/sesman.c b/sesman/sesman.c index 9ee20802..c4809a92 100644 --- a/sesman/sesman.c +++ b/sesman/sesman.c @@ -953,7 +953,7 @@ main(int argc, char **argv) "starting xrdp-sesman with pid %d", g_pid); /* make sure the socket directory exists */ - g_mk_socket_path("xrdp-sesman"); + g_mk_socket_path(); /* make sure the /tmp/.X11-unix directory exists */ if (!g_directory_exist("/tmp/.X11-unix"))