https://bugs.openldap.org/show_bug.cgi?id=9350
Issue ID: 9350 Summary: Expand test suite for null base Product: OpenLDAP Version: 2.5 Hardware: All OS: All Status: UNCONFIRMED Severity: normal Priority: --- Component: build Assignee: bugs@openldap.org Reporter: quanah@openldap.org Target Milestone: ---
Currently we have no tests that use the empty suffix (null base).
This is an entirely valid configuration setup, and there are unique challenges and bugs that crop up with this usage.
We need to ensure we're covering this use case, particularly with syncrepl and delta-syncrepl configurations.
https://bugs.openldap.org/show_bug.cgi?id=9350
--- Comment #1 from dab1818@gmail.com dab1818@gmail.com --- we using uri=null and base=null with default values from /etc/openldap/ldap.conf and i can't find any documentaion about that, only code from openldap/libraries/libldap/search.c: in function ldap_build_search_req: if ( base == NULL ) { /* no base provided, use session default base */ base = ld->ld_options.ldo_defbase;
man 3 ldap_search_s: The base parameter is the DN of the entry at which to start the search.
https://bugs.openldap.org/show_bug.cgi?id=9350
--- Comment #2 from Ondřej Kuzník ondra@mistotebe.net --- On Mon, Jan 31, 2022 at 08:34:01AM +0000, openldap-its@openldap.org wrote:
we using uri=null and base=null with default values from /etc/openldap/ldap.conf and i can't find any documentaion about that, only code from openldap/libraries/libldap/search.c: in function ldap_build_search_req: if ( base == NULL ) { /* no base provided, use session default base */ base = ld->ld_options.ldo_defbase;
man 3 ldap_search_s: The base parameter is the DN of the entry at which to start the search.
I'm pretty sure passing base = "" (as opposed to base = NULL) works as intended?
https://bugs.openldap.org/show_bug.cgi?id=9350
--- Comment #3 from dab1818@gmail.com dab1818@gmail.com --- no. base = "" it's a "Root DN" base = NULL it's a "default DN" from system-wide configuration files
for example /etc/openldap/ldap.conf: URI ldap://localhost BASE dc=example,dc=com ... #see: man 5 ldap.conf
https://bugs.openldap.org/show_bug.cgi?id=9350
--- Comment #4 from Ondřej Kuzník ondra@mistotebe.net --- On Mon, Jan 31, 2022 at 11:33:10AM +0000, openldap-its@openldap.org wrote:
no. base = "" it's a "Root DN" base = NULL it's a "default DN" from system-wide configuration files
for example /etc/openldap/ldap.conf: URI ldap://localhost BASE dc=example,dc=com ... #see: man 5 ldap.conf
Please note that usage questions belong to the openldap-technical mailing list unless you think you discovered a bug (e.g. the library behaving in a way that goes against what is documented). I don't believe this is the right bug for that either way.
Thanks,