Module: wine Branch: master Commit: af65fa044ae13d0c1142d3480d7fdcf9fb1a6280 URL: https://gitlab.winehq.org/wine/wine/-/commit/af65fa044ae13d0c1142d3480d7fdcf...
Author: Nikolay Sivov nsivov@codeweavers.com Date: Tue May 2 22:24:58 2023 +0200
ntdll/tests: Add some tests for RtlInitializeSid().
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com
---
dlls/ntdll/tests/rtl.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)
diff --git a/dlls/ntdll/tests/rtl.c b/dlls/ntdll/tests/rtl.c index ba6fea67937..c075cae4ba2 100644 --- a/dlls/ntdll/tests/rtl.c +++ b/dlls/ntdll/tests/rtl.c @@ -3608,6 +3608,24 @@ static void test_RtlFirstFreeAce(void) HeapFree(GetProcessHeap(), 0, acl); }
+static void test_RtlInitializeSid(void) +{ + SID_IDENTIFIER_AUTHORITY sid_ident = { SECURITY_NT_AUTHORITY }; + char buffer[SECURITY_MAX_SID_SIZE]; + PSID sid = (PSID)&buffer; + NTSTATUS status; + + status = RtlInitializeSid(sid, &sid_ident, 1); + ok(!status, "Unexpected status %#lx.\n", status); + + status = RtlInitializeSid(sid, &sid_ident, SID_MAX_SUB_AUTHORITIES); + todo_wine + ok(!status, "Unexpected status %#lx.\n", status); + + status = RtlInitializeSid(sid, &sid_ident, SID_MAX_SUB_AUTHORITIES + 1); + ok(status == STATUS_INVALID_PARAMETER, "Unexpected status %#lx.\n", status); +} + START_TEST(rtl) { InitFunctionPtrs(); @@ -3652,4 +3670,5 @@ START_TEST(rtl) test_DbgPrint(); test_RtlDestroyHeap(); test_RtlFirstFreeAce(); + test_RtlInitializeSid(); }