]> git.sur5r.net Git - openldap/commitdiff
fix error return when there's no write access to naming attributes (ITS#3450)
authorPierangelo Masarati <ando@openldap.org>
Wed, 29 Dec 2004 13:45:16 +0000 (13:45 +0000)
committerPierangelo Masarati <ando@openldap.org>
Wed, 29 Dec 2004 13:45:16 +0000 (13:45 +0000)
servers/slapd/modrdn.c

index ee08166ea506cf027ab69f899924353ff6965b5c..4e03e8a595664d0abd204721fb0170b9f68da3d9 100644 (file)
@@ -440,6 +440,7 @@ slap_modrdn2mods(
                                "slap_modrdn2modlist: access to attr \"%s\" "
                                "(new) not allowed\n", 
                                new_rdn[ a_cnt ]->la_attr.bv_val, 0, 0 );
+                       rs->sr_text = "access to naming attributes (new) not allowed";
                        rs->sr_err = LDAP_INSUFFICIENT_ACCESS;
                        goto done;
                }
@@ -493,6 +494,7 @@ slap_modrdn2mods(
                                        "to attr \"%s\" (old) not allowed\n", 
                                        old_rdn[ d_cnt ]->la_attr.bv_val,
                                        0, 0 );
+                               rs->sr_text = "access to naming attributes (old) not allowed";
                                rs->sr_err = LDAP_INSUFFICIENT_ACCESS;
                                goto done;
                        }
@@ -524,7 +526,7 @@ slap_modrdn2mods(
        
 done:
 
-       if ( !repl_user ) {
+       if ( rs->sr_err == LDAP_SUCCESS && !repl_user ) {
                char textbuf[ SLAP_TEXT_BUFLEN ];
                size_t textlen = sizeof textbuf;