23{
29 ULONG SecurityDescriptorSize;
37
40 &DirectoryNameString,
49 {
50 return;
51 }
52
56 0,
57 &SecurityDescriptorSize);
60 {
62 return;
63 }
64
66 SecurityDescriptorSize,
67 'dSmK');
70 {
72 return;
73 }
74
78 SecurityDescriptorSize,
79 &SecurityDescriptorSize);
82 {
86 &Defaulted);
87 if (ExpectedOwner)
89 ok(Defaulted ==
FALSE,
"Owner defaulted for %ls\n", DirectoryName);
90
94 &Defaulted);
95 if (ExpectedGroup)
97 ok(Defaulted ==
FALSE,
"Group defaulted for %ls\n", DirectoryName);
98
101 &Present,
103 &Defaulted);
105 ok(Present ==
TRUE,
"DACL not present for %ls\n", DirectoryName);
106 ok(Defaulted ==
FALSE,
"DACL defaulted for %ls\n", DirectoryName);
110
113 &Present,
115 &Defaulted);
117 ok(Present ==
FALSE,
"SACL present for %ls\n", DirectoryName);
118 ok(Defaulted ==
FALSE,
"SACL defaulted for %ls\n", DirectoryName);
120 }
123}
static HANDLE DirectoryHandle
#define ok_eq_hex(value, expected)
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
#define NT_SUCCESS(StatCode)
#define ExAllocatePoolWithTag(hernya, size, tag)
#define OBJ_KERNEL_HANDLE
#define ExFreePoolWithTag(_P, _T)
VOID VCheckAcl__(_In_ PACL Acl, _In_ ULONG AceCount, _In_ PCSTR FileAndLine, _In_ va_list Arguments)
VOID CheckSid__(_In_ PSID Sid, _In_ ULONG SidSize, _In_ PISID ExpectedSid, _In_ PCSTR FileAndLine)
#define InitializeObjectAttributes(p, n, a, r, s)
NTSYSAPI NTSTATUS NTAPI ZwOpenDirectoryObject(_Out_ PHANDLE FileHandle, _In_ ACCESS_MASK DesiredAccess, _In_ POBJECT_ATTRIBUTES ObjectAttributes)
_Out_writes_bytes_to_opt_ AbsoluteSecurityDescriptorSize PSECURITY_DESCRIPTOR _Inout_ PULONG _Out_writes_bytes_to_opt_ DaclSize PACL Dacl
_Out_writes_bytes_to_opt_ AbsoluteSecurityDescriptorSize PSECURITY_DESCRIPTOR _Inout_ PULONG _Out_writes_bytes_to_opt_ DaclSize PACL _Inout_ PULONG _Out_writes_bytes_to_opt_ SaclSize PACL _Inout_ PULONG _Out_writes_bytes_to_opt_ OwnerSize PSID Owner
NTSYSAPI NTSTATUS NTAPI RtlGetSaclSecurityDescriptor(_In_ PSECURITY_DESCRIPTOR SecurityDescriptor, _Out_ PBOOLEAN SaclPresent, _Out_ PACL *Sacl, _Out_ PBOOLEAN SaclDefaulted)
_Out_writes_bytes_to_opt_ AbsoluteSecurityDescriptorSize PSECURITY_DESCRIPTOR _Inout_ PULONG _Out_writes_bytes_to_opt_ DaclSize PACL _Inout_ PULONG _Out_writes_bytes_to_opt_ SaclSize PACL Sacl
NTSYSAPI NTSTATUS NTAPI RtlGetDaclSecurityDescriptor(_In_ PSECURITY_DESCRIPTOR SecurityDescriptor, _Out_ PBOOLEAN DaclPresent, _Out_ PACL *Dacl, _Out_ PBOOLEAN DaclDefaulted)
#define ACCESS_SYSTEM_SECURITY
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
NTSYSAPI NTSTATUS NTAPI RtlGetGroupSecurityDescriptor(IN PSECURITY_DESCRIPTOR SecurityDescriptor, OUT PSID *Group, OUT PBOOLEAN GroupDefaulted)
NTSYSAPI NTSTATUS NTAPI RtlGetOwnerSecurityDescriptor(IN PSECURITY_DESCRIPTOR SecurityDescriptor, OUT PSID *Owner, OUT PBOOLEAN OwnerDefaulted)
NTSTATUS NTAPI ObCloseHandle(IN HANDLE Handle, IN KPROCESSOR_MODE AccessMode)
#define STATUS_BUFFER_TOO_SMALL
_In_ USHORT _In_ ULONG _In_ PSOCKADDR _In_ PSOCKADDR _Reserved_ ULONG _In_opt_ PVOID _In_opt_ const WSK_CLIENT_CONNECTION_DISPATCH _In_opt_ PEPROCESS _In_opt_ PETHREAD _In_opt_ PSECURITY_DESCRIPTOR SecurityDescriptor
#define DACL_SECURITY_INFORMATION
#define OWNER_SECURITY_INFORMATION
#define GROUP_SECURITY_INFORMATION
#define SACL_SECURITY_INFORMATION