diff options
author | Pavel Roskin <plroskin@gmail.com> | 2017-03-14 21:45:50 -0700 |
---|---|---|
committer | jsorg71 <jay.sorg@gmail.com> | 2017-03-17 22:25:05 -0700 |
commit | 58c9cb43e9e83a6f5cc8a13cd84aa67cce8cacd5 (patch) | |
tree | 4440da8a15401e221175c4b6d3df6c44253e3f2e /xrdpapi/xrdpapi.c | |
parent | fc2572f60b574cf5bc45f1c7b58698681f39ac50 (diff) | |
download | xrdp-proprietary-58c9cb43e9e83a6f5cc8a13cd84aa67cce8cacd5.tar.gz xrdp-proprietary-58c9cb43e9e83a6f5cc8a13cd84aa67cce8cacd5.zip |
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.
Diffstat (limited to 'xrdpapi/xrdpapi.c')
-rw-r--r-- | xrdpapi/xrdpapi.c | 3 |
1 files changed, 2 insertions, 1 deletions
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 <sys/socket.h> #include <sys/un.h> +#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); |