Commit 9ac3f24f authored by Alexandre Julliard's avatar Alexandre Julliard

ntdll: Move the FSCTL_PIPE_IMPERSONATE semi-stub to the server.

parent 4a49af0c
......@@ -5665,8 +5665,8 @@ NTSTATUS WINAPI NtFsControlFile( HANDLE handle, HANDLE event, PIO_APC_ROUTINE ap
case FSCTL_PIPE_IMPERSONATE:
FIXME("FSCTL_PIPE_IMPERSONATE: impersonating self\n");
status = RtlImpersonateSelf( SecurityImpersonation );
break;
return server_ioctl_file( handle, event, apc, apc_context, io, code,
in_buffer, in_size, out_buffer, out_size );
case FSCTL_IS_VOLUME_MOUNTED:
case FSCTL_LOCK_VOLUME:
......
......@@ -1138,6 +1138,17 @@ static int pipe_server_ioctl( struct fd *fd, ioctl_code_t code, struct async *as
pipe_end_disconnect( &server->pipe_end, STATUS_PIPE_DISCONNECTED );
return 1;
case FSCTL_PIPE_IMPERSONATE:
if (current->process->token) /* FIXME: use the client token */
{
struct token *token;
if (!(token = token_duplicate( current->process->token, 0, SecurityImpersonation, NULL )))
return 0;
if (current->token) release_object( current->token );
current->token = token;
}
return 1;
default:
return pipe_end_ioctl( &server->pipe_end, code, async );
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment