On Thu, Apr 10, 2025 at 09:06:34PM +0100, Jeremy Harris via Exim-users wrote: > On 2025/04/10 8:19 PM, Johnnie W Adams via Exim-users wrote: > > 14:16:37 121712 re-binding with user= password=foo > > > > 14:16:37 121712 Bind succeeded: ldapauth returns OK > > OK, I see two possible problems here. > > - The exim ldapauth condition returned true for "user= password=foo". > Is that combination really supposed to be valid? > What did LDAP think of the transaction?
My quick test with exim-4.94 under Debian confirms such behaviour: # strace -e network,read,write exim4 -be \ '${if ldapauth{USER="" PASS="wrongpass" ldap://192.168.28.66/[ ... ]}}{TRUE=$value}fail}' connect(3, {sa_family=AF_INET, sin_port=htons(389), sin_addr=inet_addr("192.168.28.66")}, 16) = 0 write(3, "0\25\2\1\1`\20\2\1\3\4\0\200\twrongpass", 23) = 23 read(3, "0\204\0\0\0\20\2\1", 8) = 8 read(3, "\1a\204\0\0\0\7\n\1\0\4\0\4\0", 14) = 14 write(1, "TRUE=\n", 6TRUE= ) = 6 With empty user and right password ldapauth also return true. If user is not empty, ldapauth works as expected. Running with user="cn=ldapuser,cn=users..." and right password, strace shows: connect(3, {sa_family=AF_INET, sin_port=htons(389), sin_addr=inet_addr("192.168.28.66")}, 16) = 0 write(3, "0=\2\1\1`8\2\1\3\4*cn=ldapuser,cn=users"..., 63) = 63 read(3, "0\204\0\0\0\20\2\1", 8) = 8 read(3, "\1a\204\0\0\0\7\n\1\0\4\0\4\0", 14) = 14 write(1, "TRUE=\n", 6TRUE= ) = 6 Obviously LDAP server (192.168.28.66, Microsoft's DC) returns identical answers in both cases, for empty and non-empty users. I do not know how decode this answer, and have no access to server logs, but for me it looks like a bug in Microsoft's DC. -- Eugene Berdnikov -- ## subscription configuration (requires account): ## https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/ ## unsubscribe (doesn't require an account): ## exim-users-unsubscr...@lists.exim.org ## Exim details at http://www.exim.org/ ## Please use the Wiki with this list - http://wiki.exim.org/