Module: wine Branch: master Commit: 6c5d17af07a318d754c0c21023b2d162a0d3725d URL: https://gitlab.winehq.org/wine/wine/-/commit/6c5d17af07a318d754c0c21023b2d16...
Author: Fabian Maurer dark.shadow4@web.de Date: Sat May 25 06:26:23 2024 +0200
wow64: In wow64_NtSetInformationToken forward TokenIntegrityLevel.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56725
---
dlls/wow64/security.c | 12 ++++++++++++ dlls/wow64/struct32.h | 5 +++++ 2 files changed, 17 insertions(+)
diff --git a/dlls/wow64/security.c b/dlls/wow64/security.c index 1a3d98fccee..645e5602872 100644 --- a/dlls/wow64/security.c +++ b/dlls/wow64/security.c @@ -521,6 +521,18 @@ NTSTATUS WINAPI wow64_NtSetInformationToken( UINT *args )
switch (class) { + case TokenIntegrityLevel: /* TOKEN_MANDATORY_LABEL */ + if (len >= sizeof(TOKEN_MANDATORY_LABEL32)) + { + TOKEN_MANDATORY_LABEL32 *label32 = ptr; + TOKEN_MANDATORY_LABEL label; + + label.Label.Sid = ULongToPtr( label32->Label.Sid ); + label.Label.Attributes = label32->Label.Attributes; + return NtSetInformationToken( handle, class, &label, sizeof(label) ); + } + else return STATUS_INFO_LENGTH_MISMATCH; + case TokenSessionId: /* ULONG */ return NtSetInformationToken( handle, class, ptr, len );
diff --git a/dlls/wow64/struct32.h b/dlls/wow64/struct32.h index 87e219045f4..b196bdd53ca 100644 --- a/dlls/wow64/struct32.h +++ b/dlls/wow64/struct32.h @@ -367,6 +367,11 @@ typedef struct DWORD Attributes; } SID_AND_ATTRIBUTES32;
+typedef struct +{ + SID_AND_ATTRIBUTES32 Label; +} TOKEN_MANDATORY_LABEL32; + typedef struct { ULONG DefaultDacl;