]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#10073 back-ldap: Make sure we have a suffix configured
authorOndřej Kuzník <ondra@mistotebe.net>
Mon, 7 Aug 2023 15:14:10 +0000 (16:14 +0100)
committerQuanah Gibson-Mount <quanah@openldap.org>
Fri, 11 Aug 2023 20:00:50 +0000 (20:00 +0000)
servers/slapd/back-ldap/init.c

index e2db2a0947e9bf05aa18af2b4ebf8c923dda9013..ec32e3ccb6c03769e837843f63412325629ef25d 100644 (file)
@@ -214,6 +214,11 @@ ldap_back_db_open( BackendDB *be, ConfigReply *cr )
                "ldap_back_db_open: URI=%s\n",
                li->li_uri != NULL ? li->li_uri : "" );
 
+       if ( be->be_suffix == NULL ) {
+               Debug( LDAP_DEBUG_ANY, "ldap_back_db_open: need suffix.\n" );
+               return -1;
+       }
+
        /* by default, use proxyAuthz control on each operation */
        switch ( li->li_idassert_mode ) {
        case LDAP_BACK_IDASSERT_LEGACY: