In 4.0.3 it is not possible to use PASSDB module ldapsam built dynamically because when searching and initializing the module, file name (ldapsam.so) should be the same as module name in smb.conf. Unfortunately, pdb_ldap subsystem generates module named ldap.so. Attached patches rename pdb_ldap to pdb_ldapsam and ensure that specifying 'pdb_ldap' when configuring samba, will enable pdb_ldapsam module.
Created attachment 8534 [details] Rename pdb_ldap to pdb_ldapsam
Created attachment 8535 [details] support specifying pdb_ldap in configure for waf
Created attachment 8536 [details] support specifying pdb_ldap in autoconf configure
Karolin, please add the patches to v4-0-test. Thanks.
Pushed to autobuild-v4-0-test.
Pushed to v4-0-test. Closing out bug report. Thanks!