advapi32: GetNamedSecurityInfoExA Stub

Paul Bryan Roberts pbronline-wine at yahoo.co.uk
Tue Feb 17 14:07:46 CST 2009


Dmitry Timoshkov wrote:
> "Paul Bryan Roberts" <pbronline-wine at yahoo.co.uk> wrote:
> 
>>> It appears that GetNamedSecurityInfoExA signature doesn't match
>>> the MSDN/PSDK one. Also it's a common practice to simultaneously
>>> add both A and W versions, and add prototypes to an appropriate
>>> .h file.
>>>
>> Ah, right you are, thanks.
>>
>> I guess that should have read 'most obviously incorrect'.
>>
>> I cannot find any reference to GetNamedSecurityInfoEx with or without 
>> the A or W on http://www.msdn.microsoft.com.  I have looked several 
>> times over the last six months or so.  Is there another MSDN somewhere ?
> 
> That's the one. I made the statement that GetNamedSecurityInfoEx doesn't 
> match
> the MSDN/PSDK signature just looking at the existing 
> GetNamedSecurityInfo one.
> It appears that there are some unofficial GetNamedSecurityInfoEx docs, 
> but if
> you are using them, you should clearly point out to teh source in the patch
> comment, and not copy the API description from that source.
> 
> Does simple uncommenting of GetNamedSecurityInfoExA/W stubs in the .spec
> file help? Or the installer actually calls the APIs?
> 
>> GetSecurityInfoExW and (there is no stub for) GetSecurityInfoExA have 
>> prototypes in include/aclapi.h.  Would that be an appropriate .h to 
>> add  prototypes for GetNamedSecurityInfoExA and 
>> GetNamedSecurityInfoExW to ?
> 
> I guess so.
> 
>> If you would like I could add a stub for GetSecurityInfoExA too.  One 
>> patch or two ?
> 
> A single patch is fine.
> 

I confirmed that the installer actually calls GetNamedSecurityInfoExA 
during a normal install under native WindowsTM.  I set break points on 
the routine in the debugger that comes with the MS Debugging Tools.  The 
debugger broke the expected 9 times between two reference break points.

I first guessed the number of parameters by counting the number of push 
statements executed by the Wine debugger before making a call.  I later 
used WINEDEBUG=+snoop with WINEDLLOVERRIDES=advapi32 to corroborate.

I triangulated (biangulated ?) the function prototype from the 
prototypes for GetSecurityInfoExW() and GetNamedSecurityInfoA() that 
appear in wine/dlls/advapi32/security.c and took the return value from 
the first of those two.

This is all my own work inspired by what Wine folks who have gone before 
me have done.

Before I mustered the courage to submit the stub for the second time, I 
compared my prototype with that to be found at:

     http://www.piclist.com/techref/os/win/api/win32/func/src/f35_10.htm

The third submission would not have occurred without the encouragement 
of Dan Kegel.  I also owe thanks to Dmitry Timoshkov (oh, that's you - 
hi! ) for pointing me in the direction of the MS Debugging Tools.

I did reference the piclist web-page in the analysis I attached to bug 
14334 but accept that no one is ever likely to read it.

Please confirm you don't actually want a web-page reference in the Wine 
source.  Would that not raise "copyright-tracking" issues ?




More information about the wine-devel mailing list