summaryrefslogtreecommitdiffstats
path: root/libxrdp
diff options
context:
space:
mode:
authorspeidy <speidy@gmail.com>2017-03-19 11:03:36 +0200
committerjsorg71 <jay.sorg@gmail.com>2017-03-21 22:02:29 -0700
commit2f382d2a16b3d6ec571f408567c7a3f49b4b628a (patch)
treeaa87fc666839436a9f557cd1214c4feb0e9fd753 /libxrdp
parent9d578d9c5fdf76cac44bfabf30e80032087bac7e (diff)
downloadxrdp-proprietary-2f382d2a16b3d6ec571f408567c7a3f49b4b628a.tar.gz
xrdp-proprietary-2f382d2a16b3d6ec571f408567c7a3f49b4b628a.zip
libxrdp: print connected client name to log
Diffstat (limited to 'libxrdp')
-rw-r--r--libxrdp/xrdp_sec.c4
1 files changed, 3 insertions, 1 deletions
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 */