Correct ConvertSidToStringSidW with test

Juan Lang juan_lang at
Tue Sep 14 11:08:42 CDT 2004

After testing ConvertSidToStringSidW more on WinXP I
found out the test was sort of bogus: Windows' output
is simply buggy when the most-significant two bytes of
the identifier authority are set.

Example: both of the following identifier authorities
produce the same output string, which can't be right:
{ 0x00, 0x01, 0x00, 0x00, 0x00, 0x02 }
{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c }

So I removed the bogus test, and at least made this
function correct for the cases we should expect to see
(since all the defined identifier authorities have low
values), and add a FIXME if the upper bytes are set.

ChangeLog: fix ConvertSidToStringSidW for all expected
values, and add tests


Do you Yahoo!?
Declare Yourself - Register online to vote today!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: advapi32.diff
Type: text/x-patch
Size: 5377 bytes
Desc: advapi32.diff
Url :

More information about the wine-patches mailing list