Remove g_mk_socket_path() from codepaths
The socket dir is only used if we are starting a session with sesman. Consequently, it only makes sense to create this directory within sesman itself.
This commit is contained in:
parent
cf5e1961d3
commit
e96d77bac1
@ -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",
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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"))
|
||||
|
Loading…
Reference in New Issue
Block a user