]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/delete.c
fix possible uninitialized use of nmods
[openldap] / servers / slapd / delete.c
index 89e405c43f0ef76a7321b08e369550b93fba2d22..97f073e1b9c4e0aceec34ba0283252949f192a22 100644 (file)
@@ -102,9 +102,7 @@ do_delete(
                        NULL, "cannot delete the root DSE", NULL, NULL );
                goto cleanup;
 
-#ifdef SLAPD_SCHEMA_DN
-
-       } else if ( strcasecmp( ndn.bv_val, SLAPD_SCHEMA_DN ) == 0 ) {
+       } else if ( bvmatch( &ndn, &global_schemandn ) ) {
 #ifdef NEW_LOGGING
                LDAP_LOG( OPERATION, INFO, "do_delete: conn %d: "
                        "Attempt to delete subschema subentry.\n", conn->c_connid, 0, 0 );
@@ -115,8 +113,6 @@ do_delete(
                send_ldap_result( conn, op, rc = LDAP_UNWILLING_TO_PERFORM,
                        NULL, "cannot delete the root DSE", NULL, NULL );
                goto cleanup;
-
-#endif
        }
 
        Statslog( LDAP_DEBUG_STATS, "conn=%lu op=%lu DEL dn=\"%s\"\n",