struct berval *hash = NULL;
DB_TXN *ltid = NULL;
struct bdb_op_info opinfo;
+ char textbuf[SLAP_TEXT_BUFLEN];
+ size_t textlen = sizeof textbuf;
struct berval *id = NULL;
struct berval *new = NULL;
dn = id ? id->bv_val : op->o_dn;
- Debug( LDAP_DEBUG_TRACE, "passwd: \"%s\"%s\n",
+ Debug( LDAP_DEBUG_TRACE, "bdb_exop_passwd: \"%s\"%s\n",
dn, id ? " (proxy)" : "", 0 );
if( dn == NULL || dn[0] == '\0' ) {
}
if (0) {
- /* transaction retry */
-retry: rc = txn_abort( ltid );
+retry: /* transaction retry */
+ Debug( LDAP_DEBUG_TRACE, "bdb_exop_passwd: retrying...\n", 0, 0, 0 );
+ rc = txn_abort( ltid );
ltid = NULL;
op->o_private = NULL;
if( rc != 0 ) {
/* begin transaction */
rc = txn_begin( bdb->bi_dbenv, NULL, <id, 0 );
+ *text = NULL;
if( rc != 0 ) {
Debug( LDAP_DEBUG_TRACE,
"bdb_exop_passwd: txn_begin failed: %s (%d)\n",
if( e == NULL ) {
*text = "could not locate authorization entry";
- rc = LDAP_OPERATIONS_ERROR;
+ rc = LDAP_NO_SUCH_OBJECT;
goto done;
}
ml.sml_next = NULL;
rc = bdb_modify_internal( be, conn, op, ltid,
- op->o_ndn, &ml, e, text );
+ &ml, e, text, textbuf, textlen );
switch(rc) {
case DB_LOCK_DEADLOCK:
case DB_LOCK_NOTGRANTED:
+ *text = NULL;
bdb_entry_return( be, e );
e = NULL;
goto retry;
case DB_LOCK_DEADLOCK:
case DB_LOCK_NOTGRANTED:
bdb_entry_return( be, e );
+ e = NULL;
goto retry;
}
*text = "entry update failed";
rc = LDAP_OTHER;
- goto done;
}
done: