LookupAccountNameW() handles first user account

Paul Bryan Roberts pbronline-wine at yahoo.co.uk
Fri Sep 26 05:57:33 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 the LAST of a series of NINE patches that provide what may be a 
reasonable first pass implementation of LookupAccountNameA() and 
LookupAccountNameW() that:

    - works for well known SIDs
    - works for 'first user account'
    - adds handling of 'first user account' to LookupAccountSid
    - passes existing units tests for LookupAccountName
    - corrects knock-on regression failures in the advapit32/security.c 
unit tests (there may be others elsewhere)
    - allows progress towards the resolution of Bug 14334

This is what we have been waiting for ...

... if the account name is that of the *nix user using Wine, then return 
the 'first user account' SID and set the domain name to the computer name.

Why ?  'cos this is what I observe happens in my native Windows VM, the 
final two unit test failures in test_LookupAccountName() become passes 
and it allows progress on Bug 14334 (this is actually only the second of 
three blocking issues for that bug).

This (or any patch in the series) may break unit tests elsewhere.  I 
think the PactchWatcher will do a far more thorough job of finding such 
regressions than I ever could by hand.

This patch changes the old FIXME - stub to a TRACE and uncomments the 
new FIXMEs.

The patch includes some tidying up that I suppose I should have 
retro-fitted into earlier patches in the series but I'm git novice and 
have that yet to clamber that particular slope of the learning curve.

The patch looks a lot bigger than it is - the git difference engine 
seems to have lost the plot somewhere in essential part of the patch.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0012-LookupAccountNameW-handles-first-user-account.txt
Url: http://www.winehq.org/pipermail/wine-patches/attachments/20080926/8f9eff89/attachment.txt 

More information about the wine-patches mailing list