From 2f382d2a16b3d6ec571f408567c7a3f49b4b628a Mon Sep 17 00:00:00 2001 From: speidy Date: Sun, 19 Mar 2017 11:03:36 +0200 Subject: libxrdp: print connected client name to log --- libxrdp/xrdp_sec.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libxrdp') diff --git a/libxrdp/xrdp_sec.c b/libxrdp/xrdp_sec.c index f0ede10e..fe7a460a 100644 --- a/libxrdp/xrdp_sec.c +++ b/libxrdp/xrdp_sec.c @@ -1599,6 +1599,7 @@ xrdp_sec_process_mcs_data_CS_CORE(struct xrdp_sec* self, struct stream* s) int highColorDepth; int supportedColorDepths; int earlyCapabilityFlags; + char clientName[INFO_CLIENT_NAME_BYTES / 2] = { '\0' }; in_uint8s(s, 4); /* version */ in_uint16_le(s, self->rdp_layer->client_info.width); @@ -1617,7 +1618,8 @@ xrdp_sec_process_mcs_data_CS_CORE(struct xrdp_sec* self, struct stream* s) in_uint8s(s, 2); /* SASSequence */ in_uint8s(s, 4); /* keyboardLayout */ in_uint8s(s, 4); /* clientBuild */ - in_uint8s(s, 32); /* clientName */ + unicode_utf16_in(s, INFO_CLIENT_NAME_BYTES - 2, clientName, sizeof(clientName) - 1); /* clientName */ + log_message(LOG_LEVEL_INFO, "connected client computer name: %s", clientName); in_uint8s(s, 4); /* keyboardType */ in_uint8s(s, 4); /* keyboardSubType */ in_uint8s(s, 4); /* keyboardFunctionKey */ -- cgit v1.2.1