From be23682f909137919b2c72d1ae48bdb04a3f9c15 Mon Sep 17 00:00:00 2001 From: Oscar Salvador Date: Thu, 28 Sep 2017 08:44:00 +0200 Subject: [PATCH] xrdp: get port from configfile in access_control() This fixes #894 --- xrdp/xrdp_mm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xrdp/xrdp_mm.c b/xrdp/xrdp_mm.c index 1504f08f..c4db71eb 100644 --- a/xrdp/xrdp_mm.c +++ b/xrdp/xrdp_mm.c @@ -1471,11 +1471,13 @@ access_control(char *username, char *password, char *srv) unsigned long size; int index; int socket = g_tcp_socket(); + char port[8]; if (socket != -1) { + xrdp_mm_get_sesman_port(port, sizeof(port)); /* we use a blocking socket here */ - reply = g_tcp_connect(socket, srv, "3350"); + reply = g_tcp_connect(socket, srv, port); if (reply == 0) {