server: Retrieve the groups for a token from the server

Dan Kegel dank at kegel.com
Sun Apr 30 22:11:14 CDT 2006


James Hawkins wrote:
On 4/26/06, Robert Shearman <rob at codeweavers.com> wrote:
> ChangeLog:
> Retrieve the groups for a token using a server call instead of hard
> coding them.
>
> Before this patch, we simulated administrator's privileges in the
> TokenGroups case, but we're no longer recognized as admins.

I think it's a bug.  The following mystery kludge "fixes" it for me:

--- a/dlls/ntdll/nt.c
+++ b/dlls/ntdll/nt.c
@@ -203,7 +203,7 @@ NTSTATUS WINAPI NtQueryInformationToken(
     switch (tokeninfoclass)
     {
     case TokenGroups:
-        len = sizeof(TOKEN_GROUPS);
+        len = sizeof(TOKEN_GROUPS) + 400;  /* WAG */
         break;
     case TokenOwner:
         len = sizeof(TOKEN_OWNER) + sizeof(SID);

i.e. you have code in there to retry a badly guessed size, but it
doesn't handle all cases.

That patch seems to be a missing 'break' at the end of case TokenGroup
at line 320 of nt.c or so, too, but I dunno if that's an error. (If
it's intended,
a comment might be good.)
- Dan

--
Wine for Windows ISVs: http://kegel.com/wine/isv



More information about the wine-devel mailing list