check for NULL backend (ITS#6490)

This commit is contained in:
Pierangelo Masarati 2010-03-22 21:48:25 +00:00
parent 500133bbd7
commit 7ca6247395
2 changed files with 10 additions and 0 deletions

View 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" );

View 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 ) {