Fixed exit code processing. passwd.c never committed its password change

tranasaction.
This commit is contained in:
Howard Chu 2001-11-27 01:09:19 +00:00
parent 763faf21b1
commit 78066c08c0
3 changed files with 11 additions and 2 deletions

View File

@ -258,7 +258,8 @@ retry: rc = txn_abort( ltid );
}
/* attribute indexes */
if ( bdb_index_entry_add( be, ltid, e, e->e_attrs ) != LDAP_SUCCESS ) {
rc = bdb_index_entry_add( be, ltid, e, e->e_attrs );
if ( rc != LDAP_SUCCESS ) {
Debug( LDAP_DEBUG_TRACE, "bdb_add: index_entry_add failed\n",
0, 0, 0 );
switch( rc ) {

View File

@ -265,7 +265,8 @@ retry: /* transaction retry */
}
/* delete from id2entry */
if ( bdb_id2entry_delete( be, ltid, e->e_id ) != 0 ) {
rc = bdb_id2entry_delete( be, ltid, e->e_id );
if ( rc != 0 ) {
switch( rc ) {
case DB_LOCK_DEADLOCK:
case DB_LOCK_NOTGRANTED:

View File

@ -195,6 +195,13 @@ retry: /* transaction retry */
}
*text = "entry update failed";
rc = LDAP_OTHER;
} else
{
rc = txn_commit( ltid, 0 );
ltid = NULL;
op->o_private = NULL;
if (rc)
*text = "commit failed";
}
done: