]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-ldbm/modrdn.c
better fix to ITS#4183 (the prototype in proto-slap.h was erroneously committed earlier)
[openldap] / 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 );