]> git.sur5r.net Git - openldap/commitdiff
check for NULL backend (ITS#6490)
authorPierangelo Masarati <ando@openldap.org>
Mon, 22 Mar 2010 21:48:25 +0000 (21:48 +0000)
committerPierangelo Masarati <ando@openldap.org>
Mon, 22 Mar 2010 21:48:25 +0000 (21:48 +0000)
servers/slapd/overlays/dds.c
servers/slapd/overlays/pcache.c

index f4347209338c23eb5df55d9391d4eb7541fca400..e7a5cd83754b87401eb8f12b8e48ac92ada809f5 100644 (file)
@@ -1821,6 +1821,12 @@ slap_exop_refresh(
        op->o_req_dn = op->o_req_ndn;
 
        op->o_bd = select_backend( &op->o_req_ndn, 0 );
+       if ( op->o_bd == NULL ) {
+               send_ldap_error( op, rs, LDAP_NO_SUCH_OBJECT,
+                       "no global superior knowledge" );
+               goto done;
+       }
+
        if ( !SLAP_DYNAMIC( op->o_bd ) ) {
                send_ldap_error( op, rs, LDAP_UNAVAILABLE_CRITICAL_EXTENSION,
                        "backend does not support dynamic directory services" );
index 05f94e426866696057de3fc9de251f1cf9509ef1..78c6bed9aecb4866b42be57b2232ce3b064fda41 100644 (file)
@@ -5111,6 +5111,10 @@ pcache_exop_query_delete(
        op->o_req_dn = op->o_req_ndn;
 
        op->o_bd = select_backend( &op->o_req_ndn, 0 );
+       if ( op->o_bd == NULL ) {
+               send_ldap_error( op, rs, LDAP_NO_SUCH_OBJECT,
+                       "no global superior knowledge" );
+       }
        rs->sr_err = backend_check_restrictions( op, rs,
                (struct berval *)&pcache_exop_QUERY_DELETE );
        if ( rs->sr_err != LDAP_SUCCESS ) {