[PATCH 05/12] LookupAccountNameW() - correct call in SetEntriesInAclW()
Paul Bryan Roberts
pbronline-wine at yahoo.co.uk
Mon Oct 20 18:04:43 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.
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 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 --------------
A non-text attachment was scrubbed...
Name: 0005-LookupAccountNameW-correct-call-in-SetEntriesInA.patch
Type: text/x-diff
Size: 0 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20081021/3472caac/attachment.patch
More information about the wine-patches
mailing list