+ } else {
+ if ( isroot == -1 ) {
+ isroot = be_isroot( be, &op->o_ndn );
+ }
+
+ np_dn = NULL;
+
+ /* no parent, modrdn entry directly under root */
+ if ( ! isroot ) {
+ if ( be_issuffix( be, (struct berval *)&slap_empty_bv )
+ || be_isupdate( be, &op->o_ndn ) ) {
+ np = (Entry *)&slap_entry_root;
+
+ /* check parent for "children" acl */
+ rc = access_allowed( be, conn, op, np,
+ children, NULL, ACL_WRITE, NULL );
+
+ np = NULL;
+
+ if ( ! rc )
+ {
+#ifdef NEW_LOGGING
+ LDAP_LOG (( "modrdn", LDAP_LEVEL_ERR, "==>bdb_modrdn: no access to superior\n" ));
+#else
+ Debug( LDAP_DEBUG_TRACE,
+ "no access to new superior\n",
+ 0, 0, 0 );
+#endif
+ send_ldap_result( conn, op,
+ LDAP_INSUFFICIENT_ACCESS,
+ NULL, NULL, NULL, NULL );
+ goto return_results;
+ }
+
+#ifdef NEW_LOGGING
+ LDAP_LOG (( "modrdn", LDAP_LEVEL_DETAIL1, "bdb_modrdn: wr to children entry \"\" OK\n" ));
+#else
+ Debug( LDAP_DEBUG_TRACE,
+ "bdb_modrdn: wr to children of entry \"\" OK\n",
+ 0, 0, 0 );
+#endif
+
+ } else {
+#ifdef NEW_LOGGING
+ LDAP_LOG (( "modrdn", LDAP_LEVEL_ERR, "bdb_modrdn: new superior=\"\", not root & \"\" is not suffix\n" ));
+#else
+ Debug( LDAP_DEBUG_TRACE,
+ "bdb_modrdn: new superior=\"\", not root "
+ "& \"\" is not suffix\n",
+ 0, 0, 0);
+#endif
+ rc = LDAP_INSUFFICIENT_ACCESS;
+ goto return_results;
+ }
+ }