41 static SID_IDENTIFIER_AUTHORITY ntAuthority = SECURITY_NT_AUTHORITY;
45 PSECURITY_DESCRIPTOR securityDescriptor;
46 ULONG sdAllocationLength;
47 UCHAR administratorsSidBuffer[FIELD_OFFSET(SID, SubAuthority) +
sizeof(ULONG) * 2];
48 PSID administratorsSid;
55 administratorsSid = (PSID)administratorsSidBuffer;
60 sdAllocationLength = SECURITY_DESCRIPTOR_MIN_LENGTH +
62 (ULONG)
sizeof(ACCESS_ALLOWED_ACE) +
64 (ULONG)
sizeof(ACCESS_ALLOWED_ACE) +
67 securityDescriptor = PhAllocate(sdAllocationLength);
68 dacl = (PACL)((PCHAR)securityDescriptor + SECURITY_DESCRIPTOR_MIN_LENGTH);
71 RtlCreateAcl(dacl, sdAllocationLength - SECURITY_DESCRIPTOR_MIN_LENGTH, ACL_REVISION);
91 PhFree(securityDescriptor);
100 for (i = 0; i < 2; i++)
105 NtClose(threadHandle);
140 receiveMessage = PhAllocate(messageSize);
161 messageType = receiveMessage->
u2.
s2.Type;
172 client = portContext;
184 replyMessage = receiveMessage;
251 actualClientView = &clientView;