]> git.sur5r.net Git - openldap/commitdiff
Fixed exit code processing. passwd.c never committed its password change
authorHoward Chu <hyc@openldap.org>
Tue, 27 Nov 2001 01:09:19 +0000 (01:09 +0000)
committerHoward Chu <hyc@openldap.org>
Tue, 27 Nov 2001 01:09:19 +0000 (01:09 +0000)
tranasaction.

servers/slapd/back-bdb/add.c
servers/slapd/back-bdb/delete.c
servers/slapd/back-bdb/passwd.c

index 120d3f601d195f5410dffa34f77f9e6ceccc4d98..6a804b31d9080c9af40923605f2730ab061d72c6 100644 (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 ) {
index cb0f1b70e031fa611252a8ed31a3a098a1b2399d..7f775139937b32409c046c01e1c109407997a6d4 100644 (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:
index 3642eacfc568cb844a58b89273e685e80dd5e895..e7d7b02a12cd83ec4c6ada2c5d778de28493fadb 100644 (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: