/* LDAP v2 supporting correct attribute handling. */
LDAPRDN *new_rdn = NULL;
LDAPRDN *old_rdn = NULL;
- int rc;
+ int rc;
const char *text;
char textbuf[SLAP_TEXT_BUFLEN];
size_t textlen = sizeof textbuf;
goto done;
}
- /* check write on old entry */
- rc = access_allowed( be, conn, op, e,
- entry, NULL, ACL_WRITE, NULL );
-
switch( opinfo.boi_err ) {
case DB_LOCK_DEADLOCK:
case DB_LOCK_NOTGRANTED:
goto retry;
}
+ /* check write on old entry */
+ rc = access_allowed( be, conn, op, e, entry, NULL, ACL_WRITE, NULL );
if ( ! rc ) {
#ifdef NEW_LOGGING
LDAP_LOG ( OPERATION, ERR,
Debug( LDAP_DEBUG_TRACE, "no access to entry\n", 0,
0, 0 );
#endif
+ text = "no write access to old entry";
rc = LDAP_INSUFFICIENT_ACCESS;
goto return_results;
}
0, 0, 0);
#endif
rc = LDAP_OTHER;
+ text = "old entry's parent does not exist";
goto return_results;
}
if ( ! access_allowed( be, conn, op, p,
children, NULL, ACL_WRITE, NULL ) )
{
+ rc = LDAP_INSUFFICIENT_ACCESS;
#ifdef NEW_LOGGING
LDAP_LOG ( OPERATION, ERR,
"==>bdb_modrdn: no access to parent\n", 0, 0, 0 );
Debug( LDAP_DEBUG_TRACE, "no access to parent\n", 0,
0, 0 );
#endif
- send_ldap_result( conn, op, LDAP_INSUFFICIENT_ACCESS,
- NULL, NULL, NULL, NULL );
+ text = "no write access to old parent's children";
goto return_results;
}
if ( ! rc )
{
+ rc = LDAP_INSUFFICIENT_ACCESS;
#ifdef NEW_LOGGING
LDAP_LOG ( OPERATION, ERR,
"==>bdb_modrdn: no access to parent\n", 0, 0, 0 );
"no access to parent\n",
0, 0, 0 );
#endif
- send_ldap_result( conn, op,
- LDAP_INSUFFICIENT_ACCESS,
- NULL, NULL, NULL, NULL );
+ text = "no write access to old parent";
goto return_results;
}
"& \"\" is not suffix\n",
0, 0, 0);
#endif
+ text = "no write access to old parent";
rc = LDAP_INSUFFICIENT_ACCESS;
goto return_results;
}
"bdb_modrdn: newSup(ndn=%s) not here!\n",
np_ndn->bv_val, 0, 0);
#endif
+ text = "new superior not found";
rc = LDAP_OTHER;
goto return_results;
}
"bdb_modrdn: no wr to newSup children\n",
0, 0, 0 );
#endif
+ text = "no write access to new superior's children";
rc = LDAP_INSUFFICIENT_ACCESS;
goto return_results;
}
Debug( LDAP_DEBUG_TRACE, "bdb_modrdn: entry is alias\n",
0, 0, 0 );
#endif
-
+ text = "new superior is an alias";
rc = LDAP_ALIAS_PROBLEM;
goto return_results;
}
Debug( LDAP_DEBUG_TRACE, "bdb_modrdn: entry is referral\n",
0, 0, 0 );
#endif
-
+ text = "new superior is a referral";
rc = LDAP_OTHER;
goto return_results;
}
if ( ! rc )
{
+ rc = LDAP_INSUFFICIENT_ACCESS;
#ifdef NEW_LOGGING
LDAP_LOG ( OPERATION, ERR,
"==>bdb_modrdn: no access to superior\n", 0, 0, 0 );
"no access to new superior\n",
0, 0, 0 );
#endif
- send_ldap_result( conn, op,
- LDAP_INSUFFICIENT_ACCESS,
- NULL, NULL, NULL, NULL );
+ text = "no write access to new superior's children";
goto return_results;
}
"& \"\" is not suffix\n",
0, 0, 0);
#endif
+ text = "no write access to new superior's children";
rc = LDAP_INSUFFICIENT_ACCESS;
goto return_results;
}