return a SID when GetTokenInformation is called with class TokenOwner
Mike McCormack
mike at codeweavers.com
Thu Dec 18 03:12:24 CST 2003
ChangeLog:
* return a SID when GetTokenInformation is called with class TokenOwner
-------------- next part --------------
Index: dlls/ntdll/nt.c
===================================================================
RCS file: /home/wine/wine/dlls/ntdll/nt.c,v
retrieving revision 1.60
diff -u -r1.60 nt.c
--- dlls/ntdll/nt.c 6 Oct 2003 21:04:06 -0000 1.60
+++ dlls/ntdll/nt.c 18 Dec 2003 08:53:19 -0000
@@ -201,7 +201,7 @@
len = sizeof(TOKEN_PRIVILEGES);
break;
case TokenOwner:
- len = sizeof(TOKEN_OWNER);
+ len = sizeof(TOKEN_OWNER) + sizeof(SID);
break;
case TokenPrimaryGroup:
len = sizeof(TOKEN_PRIMARY_GROUP);
@@ -262,6 +262,17 @@
{
TOKEN_PRIVILEGES *tpriv = tokeninfo;
tpriv->PrivilegeCount = 1;
+ }
+ break;
+ case TokenOwner:
+ if (tokeninfo)
+ {
+ TOKEN_OWNER *owner = tokeninfo;
+ PSID sid = (PSID) (owner + 1);
+ SID_IDENTIFIER_AUTHORITY localSidAuthority = {SECURITY_NT_AUTHORITY};
+ RtlInitializeSid(sid, &localSidAuthority, 1);
+ *(RtlSubAuthoritySid(sid, 0)) = SECURITY_INTERACTIVE_RID;
+ owner->Owner = sid;
}
break;
}
More information about the wine-patches
mailing list