From: Pierangelo Masarati Date: Wed, 29 Dec 2004 13:45:16 +0000 (+0000) Subject: fix error return when there's no write access to naming attributes (ITS#3450) X-Git-Tag: OPENLDAP_REL_ENG_2_3_0ALPHA~13 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=889b20e358f07dc0aea28e70e1835c15c5ab4129;p=openldap fix error return when there's no write access to naming attributes (ITS#3450) --- diff --git a/servers/slapd/modrdn.c b/servers/slapd/modrdn.c index ee08166ea5..4e03e8a595 100644 --- a/servers/slapd/modrdn.c +++ b/servers/slapd/modrdn.c @@ -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;