[PATCH 05/12] (resend) LookupAccountNameW() - correct call in SetEntriesInAclW()

Paul Bryan Roberts pbronline-wine at yahoo.co.uk
Tue Oct 21 01:29:15 CDT 2008

LookupAccountNameW() has a stubbed but non-empty, incomplete, buggy
implementation.  It fails a number of unit tests but Wine code relies on

This is series of patches that provide what may be a reasonable first
pass implementation of LookupAccountNameA() and LookupAccountNameW() that:

    - passes existing units tests for LookupAccountName
    - works for well known SIDs
    - works for 'first user account'
    - allows progress towards the resolution of Bug 14334

This patch fixes a regression before it happens.

The implementation of SetEntriresInAclW() (in this source file, namely
dlls/advapi32/security.c) passes NULL for the domain name parameter and
0 as its length because it does not want to know about domains.

However, the conformance tests in test_LookupAccountName() (in
dlls/advapi32/tests/security.c) include a case that passes NULL and 0 in
this way and expects the call to fail with ERROR_INSUFFICIENT_BUFFER.
Therefore, fixing this unit test would break some other unit test.

So, this patch fixes SetEntriesInAclW() before it is broken.  It is
conformance test neutral.

Why use MAX_COMPUTERNAME_LENGTH + 1 ?  Originally, I implemented the
ninth (tenth now I think) patch before this one.  In that patch, the 
computer name is used as the domain name so this seemed like a sensible 
upper bound.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0005-LookupAccountNameW-correct-call-in-SetEntriesInAcl.txt
Url: http://www.winehq.org/pipermail/wine-patches/attachments/20081021/4ae85442/attachment.txt 

More information about the wine-patches mailing list