]> git.sur5r.net Git - openldap/commitdiff
Fix prev commit, reset parent == slap_entry_root
authorHoward Chu <hyc@openldap.org>
Wed, 28 Sep 2005 16:08:01 +0000 (16:08 +0000)
committerHoward Chu <hyc@openldap.org>
Wed, 28 Sep 2005 16:08:01 +0000 (16:08 +0000)
servers/slapd/back-ldbm/modrdn.c

index 5f4478d5daa8eb197d315f69fb1ea38343f0e1c3..a88da9c5185f9a7443b106ef3244589ebeb83e2e 100644 (file)
@@ -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 );