From: Kurt Zeilenga Date: Thu, 7 Jun 2001 07:24:01 +0000 (+0000) Subject: Import modrdn children check X-Git-Tag: OPENLDAP_REL_ENG_2_0_12~64 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=5550e224deeacccb87956df6577bd3512f2473ad;p=openldap Import modrdn children check Import slapadd already exists check Update CHANGES with ITS numbers --- diff --git a/CHANGES b/CHANGES index 049ac6f1ab..08cd39f779 100644 --- 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 diff --git a/servers/slapd/back-ldbm/modrdn.c b/servers/slapd/back-ldbm/modrdn.c index 78f8383572..45695414a7 100644 --- a/servers/slapd/back-ldbm/modrdn.c +++ b/servers/slapd/back-ldbm/modrdn.c @@ -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; } diff --git a/servers/slapd/back-ldbm/tools.c b/servers/slapd/back-ldbm/tools.c index 68d2a28969..c630e3e580 100644 --- a/servers/slapd/back-ldbm/tools.c +++ b/servers/slapd/back-ldbm/tools.c @@ -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; }