From c9195c98fd65c46451a7b186f29985fdd82511bf Mon Sep 17 00:00:00 2001 From: midipix Date: Tue, 19 Jun 2018 22:42:14 +0000 Subject: pty client interfaces: pty_query(): added NT_PTY_OFD_INFORMATION support. --- src/pty/ntapi_pty_query.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/pty/ntapi_pty_query.c b/src/pty/ntapi_pty_query.c index 725172c..77d7bb7 100644 --- a/src/pty/ntapi_pty_query.c +++ b/src/pty/ntapi_pty_query.c @@ -22,6 +22,7 @@ int32_t __stdcall __ntapi_pty_query( void * hport; nt_pty_sigctl_msg msg; nt_pty_client_info * anyinfo; + nt_pty_fd_info * ofdinfo; if (pty_info_class>=NT_PTY_INFORMATION_CAP) return NT_STATUS_INVALID_INFO_CLASS; @@ -46,6 +47,7 @@ int32_t __stdcall __ntapi_pty_query( switch (pty_info_class) { case NT_PTY_CLIENT_INFORMATION: + case NT_PTY_OFD_INFORMATION: hport = pty->hport; msg.data.ctlinfo.hpty = pty->hpty; msg.data.ctlinfo.luid.high = pty->luid.high; @@ -77,6 +79,30 @@ int32_t __stdcall __ntapi_pty_query( iosb->status = NT_STATUS_SUCCESS; iosb->info = sizeof(*anyinfo); + } else if (pty_info_class == NT_PTY_OFD_INFORMATION) { + ofdinfo = (nt_pty_fd_info *)pty_info; + ofdinfo->hpty = msg.data.ctlinfo.hpty; + ofdinfo->luid.low = msg.data.ctlinfo.luid.low; + ofdinfo->luid.high = msg.data.ctlinfo.luid.high; + + ofdinfo->access = (uint32_t)msg.data.ctlinfo.ctxarg[0]; + ofdinfo->flags = (uint32_t)msg.data.ctlinfo.ctxarg[1]; + ofdinfo->share = (uint32_t)msg.data.ctlinfo.ctxarg[2]; + ofdinfo->options = (uint32_t)msg.data.ctlinfo.ctxarg[3]; + + __ntapi->tt_guid_copy( + &ofdinfo->guid, + &msg.data.ctlinfo.guid); + + ofdinfo->section = pty->section; + ofdinfo->section_addr = pty->section_addr; + ofdinfo->section_size = pty->section_size; + ofdinfo->state = 0; + ofdinfo->hevent[0] = 0; + ofdinfo->hevent[1] = 0; + + iosb->status = NT_STATUS_SUCCESS; + iosb->info = sizeof(*ofdinfo); } return NT_STATUS_SUCCESS; -- cgit v1.2.3