Add PrimaryGroup support to NtQueryInformationToken - corrected patch
Evan Deaubl
wine at warpedview.com
Wed Aug 25 00:52:17 CDT 2004
ChangeLog:
* Added support for querying the primary group to NtQueryInformationToken
diff -urN wine-20040813.orig/dlls/ntdll/nt.c
wine-20040813.patched/dlls/ntdll/nt.c
--- wine-20040813.orig/dlls/ntdll/nt.c 2004-08-24 11:17:34.000000000
-0700
+++ wine-20040813.patched/dlls/ntdll/nt.c 2004-08-24
12:11:38.835434800 -0700
@@ -275,6 +275,21 @@
owner->Owner = sid;
}
break;
+ case TokenPrimaryGroup:
+ if (tokeninfo)
+ {
+ TOKEN_PRIMARY_GROUP *tprimarygroup = tokeninfo;
+ SID_IDENTIFIER_AUTHORITY sid = {SECURITY_NT_AUTHORITY};
+
+ /* we need to show admin privileges ! */
+ RtlAllocateAndInitializeSid( &sid,
+ 2,
+ SECURITY_BUILTIN_DOMAIN_RID,
+ DOMAIN_ALIAS_RID_ADMINS,
+ 0, 0, 0, 0, 0, 0,
+ &(tprimarygroup->PrimaryGroup));
+ }
+ break;
default:
{
ERR("Unhandled Token Information class!\n");
More information about the wine-patches
mailing list