#include "back-bdb.h"
#include "external.h"
+#include "lber_pvt.h"
int
bdb_exop_passwd(
Backend *be,
Connection *conn,
Operation *op,
- const char *reqoid,
+ struct berval *reqoid,
struct berval *reqdata,
char **rspoid,
struct berval **rspdata,
DB_LOCK lock;
assert( reqoid != NULL );
- assert( strcmp( LDAP_EXOP_MODIFY_PASSWD, reqoid ) == 0 );
+ assert( ber_bvcmp( &slap_EXOP_MODIFY_PASSWD, reqoid ) == 0 );
rc = slap_passwd_parse( reqdata,
&id, NULL, &new, text );
rc = TXN_ABORT( ltid );
ltid = NULL;
op->o_private = NULL;
+ op->o_do_not_cache = opinfo.boi_acl_cache;
if( rc != 0 ) {
rc = LDAP_OTHER;
*text = "internal error";
opinfo.boi_txn = ltid;
opinfo.boi_locker = locker;
opinfo.boi_err = 0;
+ opinfo.boi_acl_cache = op->o_do_not_cache;
op->o_private = &opinfo;
/* get entry */
vals[1].bv_val = NULL;
ml.sml_desc = slap_schema.si_ad_userPassword;
- ml.sml_bvalues = vals;
+ ml.sml_values = vals;
+#ifdef SLAP_NVALUES
+ ml.sml_nvalues = vals;
+#endif
ml.sml_op = LDAP_MOD_REPLACE;
ml.sml_next = NULL;
rc = bdb_modify_internal( be, conn, op, ltid,
&ml, e, text, textbuf, textlen );
+ if ( (rc == LDAP_INSUFFICIENT_ACCESS) && opinfo.boi_err ) {
+ rc = opinfo.boi_err;
+ }
switch(rc) {
case DB_LOCK_DEADLOCK:
case DB_LOCK_NOTGRANTED: