summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2018-06-19 22:42:14 +0000
committermidipix <writeonce@midipix.org>2018-06-19 18:57:43 -0400
commitc9195c98fd65c46451a7b186f29985fdd82511bf (patch)
treec9aa723f774fc316a9633f8d307398fbabd16964 /src
parentdda7a6772f54a476f44273d355dbd37c1f05772a (diff)
downloadntapi-c9195c98fd65c46451a7b186f29985fdd82511bf.tar.bz2
ntapi-c9195c98fd65c46451a7b186f29985fdd82511bf.tar.xz
pty client interfaces: pty_query(): added NT_PTY_OFD_INFORMATION support.
Diffstat (limited to 'src')
-rw-r--r--src/pty/ntapi_pty_query.c26
1 files changed, 26 insertions, 0 deletions
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;