From 58c9cb43e9e83a6f5cc8a13cd84aa67cce8cacd5 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Tue, 14 Mar 2017 21:45:50 -0700 Subject: Make socket directory configurable, don't hardcode /tmp/.xrdp Use XRDP_SOCKET_PATH in file_loc.h Don't define any non-socket paths in file_loc.h, they should come from the makefiles. Define all paths unconditionally, they should not be defined elsewhere. Pass XRDP_SOCKET_PATH as environment variable to the backends. --- xrdpapi/xrdpapi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'xrdpapi/xrdpapi.c') diff --git a/xrdpapi/xrdpapi.c b/xrdpapi/xrdpapi.c index 07af7091..d5666aa0 100644 --- a/xrdpapi/xrdpapi.c +++ b/xrdpapi/xrdpapi.c @@ -39,6 +39,7 @@ #include #include +#include "file_loc.h" #include "xrdpapi.h" struct wts_obj @@ -148,7 +149,7 @@ WTSVirtualChannelOpenEx(unsigned int SessionId, const char *pVirtualName, memset(&s, 0, sizeof(struct sockaddr_un)); s.sun_family = AF_UNIX; bytes = sizeof(s.sun_path); - snprintf(s.sun_path, bytes - 1, "/tmp/.xrdp/xrdpapi_%d", wts->display_num); + snprintf(s.sun_path, bytes - 1, CHANSRV_API_STR, wts->display_num); s.sun_path[bytes - 1] = 0; bytes = sizeof(struct sockaddr_un); -- cgit v1.2.3