+ isroot = be_isroot( be, &op->o_ndn );
+ if ( ! isroot ) {
+ if ( be_issuffix( be, (struct berval *)&slap_empty_bv )
+ || be_isupdate( be, &op->o_ndn ) ) {
+
+ p = (Entry *)&slap_entry_root;
+
+ /* check parent for "children" acl */
+ rc = access_allowed( be, conn, op, p,
+ children, NULL, ACL_WRITE, NULL );
+
+ p = NULL;
+
+ if ( ! rc )
+ {
+#ifdef NEW_LOGGING
+ LDAP_LOG (( "modrdn", LDAP_LEVEL_ERR, "==>bdb_modrdn: no access to parent\n" ));
+#else
+ Debug( LDAP_DEBUG_TRACE,
+ "no access to parent\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 of entry \"\" OK\n", p_dn.bv_val ));
+#else
+ Debug( LDAP_DEBUG_TRACE,
+ "bdb_modrdn: wr to children of entry \"\" OK\n",
+ 0, 0, 0 );
+#endif
+
+ p_dn.bv_val = "";
+ p_dn.bv_len = 0;
+
+#ifdef NEW_LOGGING
+ LDAP_LOG (( "modrdn", LDAP_LEVEL_DETAIL1, "==>bdb_modrdn: parent dn=\"\" \n" ));
+#else
+ Debug( LDAP_DEBUG_TRACE,
+ "bdb_modrdn: parent dn=\"\"\n",
+ 0, 0, 0 );
+#endif
+
+ } else {
+#ifdef NEW_LOGGING
+ LDAP_LOG (( "modrdn", LDAP_LEVEL_ERR, "==>bdb_modrdn: no parent, not root &\"\" is not suffix\n" ));
+#else
+ Debug( LDAP_DEBUG_TRACE,
+ "bdb_modrdn: no parent, not root "
+ "& \"\" is not suffix\n",
+ 0, 0, 0);
+#endif
+ rc = LDAP_INSUFFICIENT_ACCESS;
+ goto return_results;
+ }