summaryrefslogtreecommitdiffhomepage
path: root/src/process
diff options
context:
space:
mode:
Diffstat (limited to 'src/process')
-rw-r--r--src/process/ntapi_tt_create_native_process_v1.c8
-rw-r--r--src/process/ntapi_tt_create_native_process_v2.c8
2 files changed, 16 insertions, 0 deletions
diff --git a/src/process/ntapi_tt_create_native_process_v1.c b/src/process/ntapi_tt_create_native_process_v1.c
index a44ed4f..1163092 100644
--- a/src/process/ntapi_tt_create_native_process_v1.c
+++ b/src/process/ntapi_tt_create_native_process_v1.c
@@ -232,6 +232,14 @@ int32_t __stdcall __ntapi_tt_create_native_process_v1(nt_create_process_params *
(nt_unicode_string *)0)))
return __tt_create_process_cancel(params,hsection,status);
+ /* session registration */
+ if (params->hsession && (params->hsession != NT_INVALID_HANDLE_VALUE))
+ if ((status = __ntapi->tty_client_process_register(
+ params->hsession,
+ params->pbi.unique_process_id,
+ 0,0,0)))
+ return __tt_create_process_cancel(params,hsection,status);
+
/* update the target process environment block: */
/* make process_params point to rparams_block */
if ((status = __ntapi->zw_write_virtual_memory(
diff --git a/src/process/ntapi_tt_create_native_process_v2.c b/src/process/ntapi_tt_create_native_process_v2.c
index f28a522..f20c51f 100644
--- a/src/process/ntapi_tt_create_native_process_v2.c
+++ b/src/process/ntapi_tt_create_native_process_v2.c
@@ -211,6 +211,14 @@ int32_t __stdcall __ntapi_tt_create_native_process_v2(
params->create_process_ext_params)))
return status;
+ /* session registration */
+ if (params->hsession && (params->hsession != NT_INVALID_HANDLE_VALUE))
+ if ((status = __ntapi->tty_client_process_register(
+ params->hsession,
+ params->pbi.unique_process_id,
+ 0,0,0)))
+ return __tt_create_process_cancel(params,status);
+
/* tidy up */
__ntapi->zw_close(params->create_process_info->success_state.hfile);
__ntapi->zw_close(params->create_process_info->success_state.hsection);