]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-bdb/passwd.c
Added bdb_attribute and bdb_group ACL support routines
[openldap] / servers / slapd / back-bdb / passwd.c
index fa993077c87ae37a51ae6adeee85ac248a343ec9..3642eacfc568cb844a58b89273e685e80dd5e895 100644 (file)
@@ -32,6 +32,8 @@ bdb_exop_passwd(
        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;
@@ -130,7 +132,7 @@ retry:      /* transaction retry */
 
        if( e == NULL ) {
                *text = "could not locate authorization entry";
-               rc = LDAP_OPERATIONS_ERROR;
+               rc = LDAP_NO_SUCH_OBJECT;
                goto done;
        }
 
@@ -162,11 +164,12 @@ retry:    /* transaction retry */
                ml.sml_next = NULL;
 
                rc = bdb_modify_internal( be, conn, op, ltid,
-                       &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;
@@ -192,7 +195,6 @@ retry:      /* transaction retry */
                }
                *text = "entry update failed";
                rc = LDAP_OTHER;
-               goto done;
        }
 
 done: