]> git.sur5r.net Git - openldap/commitdiff
Import modrdn children check
authorKurt Zeilenga <kurt@openldap.org>
Thu, 7 Jun 2001 07:24:01 +0000 (07:24 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Thu, 7 Jun 2001 07:24:01 +0000 (07:24 +0000)
Import slapadd already exists check
Update CHANGES with ITS numbers

CHANGES
servers/slapd/back-ldbm/modrdn.c
servers/slapd/back-ldbm/tools.c

diff --git a/CHANGES b/CHANGES
index 049ac6f1abfa6b99a9f6cc11229bb51a687a6c1a..08cd39f779ff2641e733212955c5173499f46c11 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,15 +2,18 @@ OpenLDAP 2.0 Change Log
 
 OpenLDAP 2.0.12 Engineering
        Fixed slapd modlist2mods error text bug
-       Fixed slapd empty rootdn bug
-       Fixed slapd numericString empty value bug
+       Fixed slapd empty rootdn bug (ITS#1172)
+       Fixed slapd numericString empty value bug (ITS#1182)
        Fixed slapd undefined attr error report
+       Fixed slapd acl default clause bug (ITS#1187)
        Fixed ldapmodrdn SASL auth bug (ITS#1179)
-       Added slapd sb_max_incoming_auth support
        Added slapd DB_ENV support
+       Added slapd modrdn children check (ITS#1053,1192)
+       Added slapd sb_max_incoming_auth support (ITS#1181)
+       Added slapadd already exists check (ITS#1191)
        Updated slapd filter checks
        Updated ldaptcl API (contrib)
-       Updated ldbm to use BerkeleyDB's CDB
+       Updated ldbm to use BerkeleyDB's CDB (ITS#1176)
        Build environment
                Remove extraneous files
 
@@ -46,16 +49,16 @@ OpenLDAP 2.0.8 Release
        Fixed back-shell unbind response bug
        Fixed back-ldbm oldSuperior bug (ITS#951)
        Fixed back-ldbm modify password DN bug (ITS#1060)
-       Fixed libldap SASL GSSAPI interop bug (ITS#884)
-       Fixed libldap TLS/SASL crash bugs (ITS#889)
-       Fixed liblber exception bugs
+       Fixed -lldap SASL GSSAPI interop bug (ITS#884)
+       Fixed -lldap TLS/SASL crash bugs (ITS#889)
+       Fixed -llber exception bugs
        Added slapd RANDFILE option (ITS#1069)
        Updated slapd anonymous write default to deny
        Updated slapd syntax erorr reporting
-       Updated libldap TLS seeding (ITS#948) 
-       Updated libldap TLS certificate handling
-       Updated libldap referral/reference handling (ITS#905,1047)
-       Updated libldap schema safe_string bug (ITS#1092) 
+       Updated -lldap TLS seeding (ITS#948) 
+       Updated -lldap TLS certificate handling (ITS#903)
+       Updated -lldap referral/reference handling (ITS#905,1047)
+       Updated -lldap schema safe_string bug (ITS#1092) 
        Updated maildap
        Updated ldaptcl
        Updated client usage messages
index 78f8383572e214c92445130c97c4899d7089e901..45695414a7f21574588a4cb4e085a5494e83f409 100644 (file)
@@ -115,7 +115,15 @@ ldbm_back_modrdn(
                    e->e_dn, NULL, refs, NULL );
 
                ber_bvecfree( refs );
+               goto return_results;
+       }
+
+       if ( has_children( be, e ) ) {
+               Debug( LDAP_DEBUG_TRACE, "entry %s referral\n", 0,
+                   0, 0 );
 
+               send_ldap_result( conn, op, LDAP_NOT_ALLOWED_ON_NONLEAF,
+                   NULL, "subtree rename not supported", NULL, NULL );
                goto return_results;
        }
 
@@ -129,7 +137,8 @@ ldbm_back_modrdn(
                        Debug( LDAP_DEBUG_TRACE, "parent does not exist\n",
                                0, 0, 0);
                        send_ldap_result( conn, op, LDAP_OTHER,
-                               NULL, NULL, NULL, NULL );
+                               NULL, "parent entry does not exist", NULL, NULL );
+
                        goto return_results;
                }
 
@@ -203,7 +212,7 @@ ldbm_back_modrdn(
                               "ldbm_back_modrdn: newSup(ndn=%s) not here!\n",
                               np_ndn, 0, 0);
                        send_ldap_result( conn, op, LDAP_OTHER,
-                               NULL, NULL, NULL, NULL );
+                               NULL, "newSuperior not found", NULL, NULL );
                        goto return_results;
                }
 
@@ -229,7 +238,7 @@ ldbm_back_modrdn(
                            0, 0 );
 
                        send_ldap_result( conn, op, LDAP_ALIAS_PROBLEM,
-                           NULL, NULL, NULL, NULL );
+                           NULL, "newSuperior is an alias", NULL, NULL );
 
                        goto return_results;
                }
@@ -241,7 +250,7 @@ ldbm_back_modrdn(
                                0, 0 );
 
                        send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR,
-                           NULL, NULL, NULL, NULL );
+                           NULL, "newSuperior is a referral", NULL, NULL );
 
                        goto return_results;
                }
index 68d2a289698eb4987336029b36794ee41185dfe4..c630e3e58086d613dadfe28913e4c67a66029bfe 100644 (file)
@@ -151,6 +151,7 @@ ID ldbm_tool_entry_put(
        struct ldbminfo *li = (struct ldbminfo *) be->be_private;
        Datum key, data;
        int rc, len;
+       ID id;
 
        assert( slapMode & SLAP_TOOL_MODE );
        assert( id2entry != NULL );
@@ -164,14 +165,20 @@ ID ldbm_tool_entry_put(
        Debug( LDAP_DEBUG_TRACE, "=> ldbm_tool_entry_put( %ld, \"%s\" )\n",
                e->e_id, e->e_dn, 0 );
 
-       rc = index_entry_add( be, e, e->e_attrs );
+       id = dn2id( be, e->e_ndn );
+       if( id != NOID ) {
+               Debug( LDAP_DEBUG_TRACE,
+                       "<= ldbm_tool_entry_put: \"%s\" already exists (id=%ld)\n",
+                       e->e_ndn, id, 0 );
+               return NOID;
+       }
 
+       rc = index_entry_add( be, e, e->e_attrs );
        if( rc != 0 ) {
                return NOID;
        }
 
        rc = dn2id_add( be, e->e_ndn, e->e_id );
-
        if( rc != 0 ) {
                return NOID;
        }