[PATCH 03/12] LookupAccountNameW() - returns correct domain name length for not-so-well-known SIDs

Paul Bryan Roberts pbronline-wine at yahoo.co.uk
Mon Oct 20 18:04:07 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 was nasty.

This patch should have been done as two but whichever came first would 
have introduced regression.

These routines will return:
   - either the domain name and its length (not including the null 
terminator)
   - or the length, including the null terminator (so the caller can 
allocate enough memory to try again).

In this patch, LookupAccountNameW() returns the correct domain name 
length for not-so-well-known-SIDs and LookupAccountNameA() is changed so 
as to convert domain names from W to A correctly.  This fixes two 
failing conformance tests.

It also appears to fix two failing conformance tests for the 
well-known-SID case but this is misleading.   The code for 
well-known-SIDs isn't there and is technically even more broken than 
before.  This is addressed in the next patch.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-LookupAccountNameW-returns-correct-domain-name-l.patch
Type: text/x-diff
Size: 0 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20081021/623c463a/attachment.patch 


More information about the wine-patches mailing list