} else {
/* no parent, must be root to delete */
- if( ! be_isroot( be, op->o_ndn ) ) {
- if ( be_issuffix( be, "" ) ) {
- static const Entry rootp = { NOID, "", "", NULL, NULL };
- p = (Entry *)&rootp;
+ if( ! be_isroot( be, &op->o_ndn ) ) {
+ if ( be_issuffix( be, "" ) || be_isupdate( be, &op->o_ndn ) ) {
+ p = (Entry *)&slap_entry_root;
rc = access_allowed( be, conn, op, p,
children, NULL, ACL_WRITE );
rc = 0;
return_results:;
- if ( pdn != NULL ) free(pdn);
-
if( p != NULL ) {
/* free parent and writer lock */
cache_return_entry_w( &li->li_cache, p );