Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52845 Signed-off-by: Fabian Maurer dark.shadow4@web.de --- v2: Add tests, adjust groups --- dlls/advapi32/tests/security.c | 3 +++ dlls/ntdll/unix/security.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c index 135a45f7727..687d307903c 100644 --- a/dlls/advapi32/tests/security.c +++ b/dlls/advapi32/tests/security.c @@ -1898,6 +1898,9 @@ static void test_token_attr(void) /* S-1-5-5-0-XXXXXX */ ret = IsWellKnownSid(Groups->Groups[0].Sid, WinLogonIdsSid); ok(ret, "Unknown SID\n"); + + ok(Groups->Groups[0].Attributes == SE_GROUP_MANDATORY | SE_GROUP_ENABLED_BY_DEFAULT | SE_GROUP_ENABLED | SE_GROUP_LOGON_ID, + "Got %x\n", Groups->Groups[0].Attributes); } }
diff --git a/dlls/ntdll/unix/security.c b/dlls/ntdll/unix/security.c index 2955355353e..dc6662640c6 100644 --- a/dlls/ntdll/unix/security.c +++ b/dlls/ntdll/unix/security.c @@ -480,7 +480,7 @@ NTSTATUS WINAPI NtQueryInformationToken( HANDLE token, TOKEN_INFORMATION_CLASS c { groups->GroupCount = 1; groups->Groups[0].Sid = sid; - groups->Groups[0].Attributes = 0; + groups->Groups[0].Attributes = SE_GROUP_MANDATORY | SE_GROUP_ENABLED_BY_DEFAULT | SE_GROUP_ENABLED | SE_GROUP_LOGON_ID; } } SERVER_END_REQ; -- 2.36.0