From e7445a2544f6b4319a53f2fea71358b9a746f298 Mon Sep 17 00:00:00 2001 From: Laxmikant Rashinkar Date: Fri, 28 Feb 2014 19:28:31 -0800 Subject: [PATCH] o default login limit is now 50 users (instead of 10) o we now wait for 30 seconds for session connection (instead of 1) o if AUTO_LOGON flag is set but username is null, we force login dialog to show up --- libxrdp/xrdp_sec.c | 10 ++++++++++ sesman/sesman.ini | 2 +- xup/xup.c | 12 ++++++------ 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/libxrdp/xrdp_sec.c b/libxrdp/xrdp_sec.c index ee2aa319..a4fe8c5a 100644 --- a/libxrdp/xrdp_sec.c +++ b/libxrdp/xrdp_sec.c @@ -543,6 +543,16 @@ xrdp_sec_process_logon_info(struct xrdp_sec *self, struct stream *s) } in_uint16_le(s, len_user); + /* + * Microsoft's itap client running on Mac OS/Android + * always sends autologon credentials, even when user has not + * configured any + */ + if (len_user == 0) + { + self->rdp_layer->client_info.rdp_autologin = 0; + } + if (len_user > 511) { DEBUG(("ERROR [xrdp_sec_process_logon_info()]: len_user > 511")); diff --git a/sesman/sesman.ini b/sesman/sesman.ini index 02fef5ba..5ee0b4cd 100644 --- a/sesman/sesman.ini +++ b/sesman/sesman.ini @@ -16,7 +16,7 @@ AlwaysGroupCheck = false [Sessions] X11DisplayOffset=10 -MaxSessions=10 +MaxSessions=50 # if 1, true, or yes, kill session after 60 seconds KillDisconnected=0 # if not zero, the seconds without mouse or keyboard input before disconnect diff --git a/xup/xup.c b/xup/xup.c index 12c570af..773f3da1 100644 --- a/xup/xup.c +++ b/xup/xup.c @@ -223,7 +223,7 @@ lib_mod_connect(struct mod *mod) g_tcp_set_no_delay(mod->sck); } - mod->server_msg(mod, "connecting...", 0); + /* mod->server_msg(mod, "connecting...", 0); */ if (use_uds) { @@ -255,7 +255,7 @@ lib_mod_connect(struct mod *mod) } else { - mod->server_msg(mod, "connect error", 0); + /* mod->server_msg(mod, "connect error", 0); */ } } @@ -268,13 +268,13 @@ lib_mod_connect(struct mod *mod) mod->sck = 0; i++; - if (i >= 4) + if (i >= 60) { mod->server_msg(mod, "connection problem, giving up", 0); break; } - g_sleep(250); + g_sleep(500); } if (error == 0) @@ -1229,7 +1229,7 @@ process_server_paint_rect_shmem_ex(struct mod *amod, struct stream *s) in_uint16_le(s, width); in_uint16_le(s, height); - + bmpdata = 0; if (flags == 0) /* screen */ { @@ -1245,7 +1245,7 @@ process_server_paint_rect_shmem_ex(struct mod *amod, struct stream *s) } if (bmpdata != 0) { - + rv = amod->server_paint_rects(amod, num_drects, ldrects, num_crects, lcrects, bmpdata, width, height, 0);