summaryrefslogtreecommitdiffstats
path: root/sesman/tools
diff options
context:
space:
mode:
authorPavel Roskin <plroskin@gmail.com>2017-03-14 21:45:50 -0700
committerjsorg71 <jay.sorg@gmail.com>2017-03-17 22:25:05 -0700
commit58c9cb43e9e83a6f5cc8a13cd84aa67cce8cacd5 (patch)
tree4440da8a15401e221175c4b6d3df6c44253e3f2e /sesman/tools
parentfc2572f60b574cf5bc45f1c7b58698681f39ac50 (diff)
downloadxrdp-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 'sesman/tools')
-rw-r--r--sesman/tools/Makefile.am1
-rw-r--r--sesman/tools/dis.c4
2 files changed, 4 insertions, 1 deletions
diff --git a/sesman/tools/Makefile.am b/sesman/tools/Makefile.am
index 9d6d6f9e..2f8be440 100644
--- a/sesman/tools/Makefile.am
+++ b/sesman/tools/Makefile.am
@@ -3,6 +3,7 @@ AM_CPPFLAGS = \
-DXRDP_SBIN_PATH=\"${sbindir}\" \
-DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \
-DXRDP_PID_PATH=\"${localstatedir}/run\" \
+ -DXRDP_SOCKET_PATH=\"${socketdir}\" \
-I$(top_srcdir)/common \
-I$(top_srcdir)/sesman/libscp \
-I$(top_srcdir)/sesman
diff --git a/sesman/tools/dis.c b/sesman/tools/dis.c
index 086dc1b9..61f2bea2 100644
--- a/sesman/tools/dis.c
+++ b/sesman/tools/dis.c
@@ -27,6 +27,8 @@
#include <sys/socket.h>
#include <sys/un.h>
+#include "file_loc.h"
+
int main(int argc, char **argv)
{
int sck;
@@ -54,7 +56,7 @@ int main(int argc, char **argv)
dis = strtol(display + 1, &p, 10);
memset(&sa, 0, sizeof(sa));
sa.sun_family = AF_UNIX;
- sprintf(sa.sun_path, "/tmp/.xrdp/xrdp_disconnect_display_%d", dis);
+ sprintf(sa.sun_path, XRDP_DISCONNECT_STR, dis);
if (access(sa.sun_path, F_OK) != 0)
{