summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2017-07-30 21:21:21 +0000
committermidipix <writeonce@midipix.org>2017-07-31 08:43:36 -0400
commitdf0e429a0627515b82a23f88c7feeb9e9dd5ddb6 (patch)
tree877f6a354516d63cc155cd38f1c2176e374a09ef
parentb58b750f6fa5386da21c97299143da34081553df (diff)
downloadntapi-df0e429a0627515b82a23f88c7feeb9e9dd5ddb6.tar.bz2
ntapi-df0e429a0627515b82a23f88c7feeb9e9dd5ddb6.tar.xz
subsystem interfaces: session creation: set ppid_type and co. with server chain.
-rw-r--r--src/tty/ntapi_tty_create_session.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/tty/ntapi_tty_create_session.c b/src/tty/ntapi_tty_create_session.c
index bac3a20..a5452d2 100644
--- a/src/tty/ntapi_tty_create_session.c
+++ b/src/tty/ntapi_tty_create_session.c
@@ -42,6 +42,7 @@ int32_t __stdcall __ntapi_tty_create_session(
nt_iosb iosb;
nt_port_attr port_attr;
+ nt_runtime_data * rtdata;
nt_runtime_data ssattr;
nt_runtime_data_block rtblock;
nt_create_process_params params;
@@ -56,6 +57,7 @@ int32_t __stdcall __ntapi_tty_create_session(
/* init */
__internals = __ntapi_internals();
+ rtdata = __internals->rtdata;
__ntapi->tt_aligned_block_memset(
&port_attr,0,sizeof(port_attr));
@@ -174,6 +176,23 @@ int32_t __stdcall __ntapi_tty_create_session(
NT_EVENT_NOT_SIGNALED)))
return status;
+ /* server chain */
+ if (rtdata->srv_type) {
+ ssattr.ppid_type = rtdata->srv_type;
+ ssattr.ppid_subtype = rtdata->srv_subtype;
+
+ ssattr.ppid_keys[0] = rtdata->srv_keys[0];
+ ssattr.ppid_keys[1] = rtdata->srv_keys[1];
+ ssattr.ppid_keys[2] = rtdata->srv_keys[2];
+ ssattr.ppid_keys[3] = rtdata->srv_keys[3];
+ ssattr.ppid_keys[4] = rtdata->srv_keys[4];
+ ssattr.ppid_keys[5] = rtdata->srv_keys[5];
+
+ __ntapi->tt_guid_copy(
+ &ssattr.ppid_guid,
+ &rtdata->srv_guid);
+ }
+
/* create subsystem process */
rtblock.addr = &ssattr;
rtblock.size = sizeof(ssattr);