From 02aa39c79d533cf6d5932363913ddad277f0e8ed Mon Sep 17 00:00:00 2001 From: Jay Sorg Date: Sun, 12 Jan 2014 18:24:07 -0800 Subject: [PATCH] added keyboard type and subtype to struct xrdp_client_info --- common/xrdp_client_info.h | 3 +++ libxrdp/xrdp_sec.c | 9 +++++++++ 2 files changed, 12 insertions(+) diff --git a/common/xrdp_client_info.h b/common/xrdp_client_info.h index acd145e6..1d7242bd 100644 --- a/common/xrdp_client_info.h +++ b/common/xrdp_client_info.h @@ -110,6 +110,9 @@ struct xrdp_client_info int multimon; /* 0 = deny , 1 = allow */ int monitorCount; /* number of monitors detected (max = 16) */ struct monitor_info minfo[16]; /* client monitor data */ + + int keyboard_type; + int keyboard_subtype; }; #endif diff --git a/libxrdp/xrdp_sec.c b/libxrdp/xrdp_sec.c index f52a080d..d1bd49de 100644 --- a/libxrdp/xrdp_sec.c +++ b/libxrdp/xrdp_sec.c @@ -1232,6 +1232,15 @@ xrdp_sec_in_mcs_data(struct xrdp_sec *self) } in_uint8s(s, 39); in_uint32_le(s, client_info->keylayout); + /* get keyboard type / subtype */ + s->p = s->data; + if (!s_check_rem(s, 79 + 8)) + { + return 1; + } + in_uint8s(s, 79); + in_uint32_le(s, client_info->keyboard_type); + in_uint32_le(s, client_info->keyboard_subtype); s->p = s->data; return 0; }