From 17694858682f118fe76787a850cddb99313942b3 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Wed, 28 Sep 2005 16:08:01 +0000 Subject: [PATCH] Fix prev commit, reset parent == slap_entry_root --- servers/slapd/back-ldbm/modrdn.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/servers/slapd/back-ldbm/modrdn.c b/servers/slapd/back-ldbm/modrdn.c index 5f4478d5da..a88da9c518 100644 --- a/servers/slapd/back-ldbm/modrdn.c +++ b/servers/slapd/back-ldbm/modrdn.c @@ -163,10 +163,15 @@ ldbm_back_modrdn( } /* check parent for "children" acl */ - if ( ! access_allowed( op, p, children, NULL, + rs->sr_err = access_allowed( op, p, children, NULL, op->oq_modrdn.rs_newSup != NULL ? ACL_WDEL : ACL_WRITE, - NULL ) ) + NULL ); + + if ( BER_BVISEMPTY( &p_ndn )) + p = NULL; + + if ( !rs->sr_err ) { Debug( LDAP_DEBUG_TRACE, "no access to parent\n", 0, 0, 0 ); @@ -176,9 +181,6 @@ ldbm_back_modrdn( goto return_results; } - if ( BER_BVISEMPTY( &p_ndn )) - p = NULL; - Debug( LDAP_DEBUG_TRACE, "ldbm_back_modrdn: wr to children of entry %s OK\n", p_ndn.bv_val, 0, 0 ); -- 2.39.5