ntdll: Fix NtQueryInformationToken(TokenGroups)

Robert Shearman rob at codeweavers.com
Tue May 2 04:30:45 CDT 2006


Dan Kegel wrote:

> Rob wrote:
>
>> Fix the buffer check for NtQueryInformationToken(TokenGroups) so that it
>> doesn't return STATUS_BUFFER_TOO_SMALL when it shouldn't. Use the same
>> code for returning the required buffer and for calculating whether the
>> buffer is sufficient so this can't happen again.
>
>
> Sadly, this doesn't seem to fix mdac installation.  I still need my
> Magic Kludge:
> --- 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);
>
> Have you tested with mdac-2.7's installer?  It seems to tickle a path
> you're not checking.


Hi Dan,

Sorry about this regression. Hopefully, the attached patch should fix it.

-- 
Rob Shearman

-------------- next part --------------
A non-text attachment was scrubbed...
Name: token_groups.diff
Type: text/x-patch
Size: 384 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20060502/c4691f2a/token_groups.diff


More information about the wine-devel mailing list