]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/backend.c
reject registrations when back-monitor is not configured
[openldap] / servers / slapd / backend.c
index 63a3d00a98c7e4b0fa1b4741f849087794c82446..f6f868a30d52d0b061e65f49992eb8b010aba4c6 100644 (file)
@@ -477,7 +477,9 @@ int backend_destroy(void)
                }
                acl_destroy( bd->be_acl, frontendDB->be_acl );
 
-               assert( bd->be_replogfile == NULL );
+               if ( bd->be_replogfile != NULL ) {
+                       free( bd->be_replogfile );
+               }
                assert( bd->be_replica == NULL );
        }
 
@@ -835,11 +837,14 @@ backend_check_controls(
                }
        }
 
+       /* temporarily removed */
+#if 0
        /* check should be generalized */
        if( get_manageDIT(op) && !be_isroot(op)) {
                rs->sr_text = "requires manager authorization";
                rs->sr_err = LDAP_UNWILLING_TO_PERFORM;
        }
+#endif
 
 done:;
        return rs->sr_err;
@@ -1181,19 +1186,17 @@ be_entry_get_rw(
        int rw,
        Entry **e )
 {
-       int rc;
-
        *e = NULL;
 
-       if (op->o_bd == NULL) {
-               rc = LDAP_NO_SUCH_OBJECT;
-       } else if ( op->o_bd->be_fetch ) {
-               rc = ( op->o_bd->be_fetch )( op, ndn,
-                       oc, at, rw, e );
-       } else {
-               rc = LDAP_UNWILLING_TO_PERFORM;
+       if ( op->o_bd == NULL ) {
+               return LDAP_NO_SUCH_OBJECT;
        }
-       return rc;
+
+       if ( op->o_bd->be_fetch ) {
+               return op->o_bd->be_fetch( op, ndn, oc, at, rw, e );
+       }
+
+       return LDAP_UNWILLING_TO_PERFORM;
 }
 
 int 
@@ -1663,7 +1666,7 @@ fe_aux_operational(
                /* Let the overlays have a chance at this */
                be_orig = op->o_bd;
                op->o_bd = select_backend( &op->o_req_ndn, 0, 0 );
-               if ( op->o_bd != frontendDB &&
+               if ( !be_match( op->o_bd, frontendDB ) &&
                        ( SLAP_OPATTRS( rs->sr_attr_flags ) || rs->sr_attrs ) &&
                        op->o_bd != NULL && op->o_bd->be_operational != NULL )
                {