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.
This commit is contained in:
matt335672 2024-09-13 11:48:08 +01:00
parent ab56c2b52a
commit dd1dc7c630
2 changed files with 4 additions and 1 deletions

View File

@ -4,6 +4,7 @@
AM_CPPFLAGS = \ AM_CPPFLAGS = \
-DXRDP_PAMCONF_PATH=\"${pamconfdir}\" \ -DXRDP_PAMCONF_PATH=\"${pamconfdir}\" \
-DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \
-DXRDP_SOCKET_ROOT_PATH=\"${socketdir}\" \
-I$(top_srcdir)/libipm \ -I$(top_srcdir)/libipm \
-I$(top_srcdir)/common -I$(top_srcdir)/common
# -DXRDP_SBIN_PATH=\"${sbindir}\" \ # -DXRDP_SBIN_PATH=\"${sbindir}\" \

View File

@ -31,6 +31,8 @@
#include "list.h" #include "list.h"
#include "log.h" #include "log.h"
#include "xrdp_sockets.h"
enum SESMAN_CFG_SESS_POLICY_BITS enum SESMAN_CFG_SESS_POLICY_BITS
{ {
/* If these two are set, they override everything else */ /* If these two are set, they override everything else */
@ -182,7 +184,7 @@ struct config_sesman
* @var listen_port * @var listen_port
* @brief Listening port * @brief Listening port
*/ */
char listen_port[256]; char listen_port[XRDP_SOCKETS_MAXPATH];
/** /**
* @var enable_user_wm * @var enable_user_wm
* @brief Flag that enables user specific wm * @brief Flag that enables user specific wm