Debug( LDAP_DEBUG_TRACE, "bdb_exop_passwd: retrying...\n", 0, 0, 0 );
Debug( LDAP_DEBUG_TRACE, "bdb_exop_passwd: retrying...\n", 0, 0, 0 );
- if( bdb->bi_txn ) {
- /* begin transaction */
- rc = txn_begin( bdb->bi_dbenv, NULL, <id,
- bdb->bi_db_opflags );
- *text = NULL;
- if( rc != 0 ) {
- Debug( LDAP_DEBUG_TRACE,
- "bdb_exop_passwd: txn_begin failed: %s (%d)\n",
- db_strerror(rc), rc, 0 );
- rc = LDAP_OTHER;
- *text = "internal error";
- goto done;
- }
+ /* begin transaction */
+ rc = TXN_BEGIN( bdb->bi_dbenv, NULL, <id,
+ bdb->bi_db_opflags );
+ *text = NULL;
+ if( rc != 0 ) {
+ Debug( LDAP_DEBUG_TRACE,
+ "bdb_exop_passwd: txn_begin failed: %s (%d)\n",
+ db_strerror(rc), rc, 0 );
+ rc = LDAP_OTHER;
+ *text = "internal error";
+ goto done;
- rc = bdb_dn2entry( be, ltid, dn, &e, NULL, 0 );
+ rc = bdb_dn2entry_w( be, ltid, dn, &e, NULL, 0 );
if( is_entry_alias( e ) ) {
/* entry is an alias, don't allow operation */
*text = "authorization entry is alias";
rc = LDAP_ALIAS_PROBLEM;
goto done;
}
if( is_entry_alias( e ) ) {
/* entry is an alias, don't allow operation */
*text = "authorization entry is alias";
rc = LDAP_ALIAS_PROBLEM;
goto done;
}
if( is_entry_referral( e ) ) {
/* entry is an referral, don't allow operation */
*text = "authorization entry is referral";
if( is_entry_referral( e ) ) {
/* entry is an referral, don't allow operation */
*text = "authorization entry is referral";
- if( bdb->bi_txn && rc == 0 ) {
- rc = txn_commit( ltid, 0 );
+ if( rc == 0 ) {
+ if( op->o_noop ) {
+ rc = TXN_ABORT( ltid );
+ } else {
+ rc = TXN_COMMIT( ltid, 0 );
+ }