]> git.sur5r.net Git - openldap/blobdiff - libraries/libldap/search.c
LDAP C-API changes
[openldap] / libraries / libldap / search.c
index c6be97c4d761cf84037089b301d7c6e29725139f..daa4017a67ea5eeda3a4cf54670451bcc8825837 100644 (file)
@@ -112,6 +112,12 @@ ldap_build_search_req( LDAP *ld, char *base, int scope, char *filter,
        }
 
        if ( base == NULL ) {
+               /* no base provided, use session default base */
+               base = ld->ld_options.ldo_defbase;
+       }
+
+       if ( base == NULL ) {
+               /* no session default base, use top */
            base = "";
        }