https://bugs.winehq.org/show_bug.cgi?id=50634
Bug ID: 50634 Summary: IADsOpenDSObject::OpenDSObject() must be splitting "domain\user" username into ldap_bind_s()'s Domain and User Product: Wine Version: 6.1 Hardware: x86-64 OS: Linux Status: NEW Severity: normal Priority: P2 Component: activeds Assignee: wine-bugs@winehq.org Reporter: damjan.jov@gmail.com Distribution: ---
Created attachment 69341 --> https://bugs.winehq.org/attachment.cgi?id=69341 AD domain\user authentication test case
As per the patch I am going to send:
"Extensive tests show that, for the secure authentication case, adsldp's IADsOpenDSObject::OpenDSObject() and wldap32's ldap_bind_s() both agree on success/failure and generate equivalent network packets, only when IADsOpenDSObject::OpenDSObject() splits up "domain\user" style usernames into SEC_WINNT_AUTH_IDENTITY_W's Domain and User, while ldap_bind_s() receives them already split up like that, regardless of the domain's format (domain, domain.local) or even correctness."
This is the testcase I used to develop my patch. It requires a specific AD server so I cannot add it to the tree.
Build: i686-w64-mingw32-gcc10 ldaptest.c -o ldaptest.exe -lwldap32 -lole32 -loleaut32
Run: [wine] ldaptest.exe server:port user password
with the "user" being either a username or domain\username with different domains.