diff options
Diffstat (limited to 'src/ipc/ntapi_tt_create_pipe_v2.c')
-rw-r--r-- | src/ipc/ntapi_tt_create_pipe_v2.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/src/ipc/ntapi_tt_create_pipe_v2.c b/src/ipc/ntapi_tt_create_pipe_v2.c index 61142f6..a61036b 100644 --- a/src/ipc/ntapi_tt_create_pipe_v2.c +++ b/src/ipc/ntapi_tt_create_pipe_v2.c @@ -14,7 +14,7 @@ int32_t __stdcall __ntapi_ipc_create_pipe_v2( __out void ** hpipe_read, __out void ** hpipe_write, - __in uint32_t advisory_buffer_size __optional) + __in uint32_t advisory_buffer_size) { int32_t status; @@ -33,8 +33,6 @@ int32_t __stdcall __ntapi_ipc_create_pipe_v2( '\\','N','a','m','e','d','P','i','p','e','\\',0 }; - (void)advisory_buffer_size; - /* nt_name: pipe device directory */ nt_name.strlen = (uint16_t)(sizeof(pipe_dir) - sizeof(wchar16_t)); nt_name.maxlen = 0; @@ -42,8 +40,8 @@ int32_t __stdcall __ntapi_ipc_create_pipe_v2( /* init security structure */ sqos.length = sizeof(sqos); - sqos.impersonation_level = NT_SECURITY_IMPERSONATION; - sqos.context_tracking_mode = NT_SECURITY_TRACKING_DYNAMIC; + sqos.impersonation_level = NT_SECURITY_ANONYMOUS; + sqos.context_tracking_mode = NT_SECURITY_TRACKING_STATIC; sqos.effective_only = 1; /* oa */ @@ -79,12 +77,12 @@ int32_t __stdcall __ntapi_ipc_create_pipe_v2( NT_FILE_SHARE_READ | NT_FILE_SHARE_WRITE, NT_FILE_CREATE, NT_FILE_ASYNCHRONOUS_IO, - 0, - 0, - 0, + NT_FILE_PIPE_BYTE_STREAM_TYPE, + NT_FILE_PIPE_BYTE_STREAM_MODE, + NT_FILE_PIPE_QUEUE_OPERATION, 1, - 0X2000, - 0x2000, + advisory_buffer_size, + advisory_buffer_size, &timeout); __ntapi->zw_close( @@ -102,7 +100,7 @@ int32_t __stdcall __ntapi_ipc_create_pipe_v2( &oa, &iosb, NT_FILE_SHARE_READ | NT_FILE_SHARE_WRITE, - NT_FILE_WRITE_THROUGH | NT_FILE_ASYNCHRONOUS_IO | NT_FILE_NON_DIRECTORY_FILE); + NT_FILE_WRITE_THROUGH | NT_FILE_SYNCHRONOUS_IO_ALERT | NT_FILE_NON_DIRECTORY_FILE); if (status) { __ntapi->zw_close(hread); |