From dd1dc7c630e4737d5fcff7dbc9e9e7f5fe20a401 Mon Sep 17 00:00:00 2001 From: matt335672 <30179339+matt335672@users.noreply.github.com> Date: Fri, 13 Sep 2024 11:48:08 +0100 Subject: [PATCH] Use proper define for sesman listen_port size The size of the listen_port for sesman cannot exceed XRDP_SOCKETS_MAXPATH. We should use this value rather than an arbitrary value of 256. --- sesman/libsesman/Makefile.am | 1 + sesman/libsesman/sesman_config.h | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/sesman/libsesman/Makefile.am b/sesman/libsesman/Makefile.am index 7536cfeb..7ef44455 100644 --- a/sesman/libsesman/Makefile.am +++ b/sesman/libsesman/Makefile.am @@ -4,6 +4,7 @@ AM_CPPFLAGS = \ -DXRDP_PAMCONF_PATH=\"${pamconfdir}\" \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ + -DXRDP_SOCKET_ROOT_PATH=\"${socketdir}\" \ -I$(top_srcdir)/libipm \ -I$(top_srcdir)/common # -DXRDP_SBIN_PATH=\"${sbindir}\" \ diff --git a/sesman/libsesman/sesman_config.h b/sesman/libsesman/sesman_config.h index 5f403fa1..aa8d43dc 100644 --- a/sesman/libsesman/sesman_config.h +++ b/sesman/libsesman/sesman_config.h @@ -31,6 +31,8 @@ #include "list.h" #include "log.h" +#include "xrdp_sockets.h" + enum SESMAN_CFG_SESS_POLICY_BITS { /* If these two are set, they override everything else */ @@ -182,7 +184,7 @@ struct config_sesman * @var listen_port * @brief Listening port */ - char listen_port[256]; + char listen_port[XRDP_SOCKETS_MAXPATH]; /** * @var enable_user_wm * @brief Flag that enables user specific wm