]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/delete.c
Per ITS#419, don't require SLAPD_RLOOKUPS when HAVE_TCPD
[openldap] / servers / slapd / delete.c
index ae27648ab5ed73697005a4f4fdf95677b8d4a250..77b2f4098a1e76f37cdb4af0c7110a0126c8795b 100644 (file)
@@ -22,6 +22,7 @@
 #include <ac/string.h>
 #include <ac/socket.h>
 
+#include "ldap_pvt.h"
 #include "slap.h"
 
 int
@@ -59,7 +60,7 @@ do_delete(
 
        ndn = ch_strdup( dn );
 
-       if(     dn_normalize_case( ndn ) == NULL ) {
+       if(     dn_normalize( ndn ) == NULL ) {
                Debug( LDAP_DEBUG_ANY, "do_delete: invalid dn (%s)\n", dn, 0, 0 );
                send_ldap_result( conn, op, rc = LDAP_INVALID_DN_SYNTAX, NULL,
                    "invalid DN", NULL, NULL );
@@ -71,8 +72,8 @@ do_delete(
                goto cleanup;
        } 
 
-       Debug( LDAP_DEBUG_ARGS, "do_delete: dn (%s)\n", dn, 0, 0 );
-       Debug( LDAP_DEBUG_STATS, "DEL dn=\"%s\"\n", dn, 0, 0 );
+       Statslog( LDAP_DEBUG_STATS, "conn=%ld op=%d DEL dn=\"%s\"\n",
+               op->o_connid, op->o_opid, dn, 0, 0 );
 
        /*
         * We could be serving multiple database backends.  Select the
@@ -85,6 +86,14 @@ do_delete(
                goto cleanup;
        }
 
+       /* make sure this backend recongizes critical controls */
+       rc = backend_check_controls( be, conn, op ) ;
+
+       if( rc != LDAP_SUCCESS ) {
+               send_ldap_result( conn, op, rc,
+                       NULL, NULL, NULL, NULL );
+       }
+
        if ( global_readonly || be->be_readonly ) {
                Debug( LDAP_DEBUG_ANY, "do_delete: database is read-only\n",
                       0, 0, 0 );