mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-06 10:46:21 +08:00
Align with back-ldbm version
This commit is contained in:
parent
9eac390e2f
commit
dbfc18985a
@ -38,7 +38,8 @@ bdb_exop_passwd(
|
||||
struct berval id = { 0, NULL };
|
||||
struct berval new = { 0, NULL };
|
||||
|
||||
struct berval *dn;
|
||||
struct berval dn;
|
||||
struct berval ndn;
|
||||
|
||||
assert( reqoid != NULL );
|
||||
assert( strcmp( LDAP_EXOP_MODIFY_PASSWD, reqoid ) == 0 );
|
||||
@ -73,17 +74,27 @@ bdb_exop_passwd(
|
||||
goto done;
|
||||
}
|
||||
|
||||
dn = id.bv_val ? &id : &op->o_dn;
|
||||
if( id.bv_len ) {
|
||||
dn = id;
|
||||
} else {
|
||||
dn = op->o_dn;
|
||||
}
|
||||
|
||||
Debug( LDAP_DEBUG_TRACE, "bdb_exop_passwd: \"%s\"%s\n",
|
||||
dn->bv_val, id.bv_val ? " (proxy)" : "", 0 );
|
||||
dn.bv_val, id.bv_len ? " (proxy)" : "", 0 );
|
||||
|
||||
if( dn->bv_len == 0 ) {
|
||||
if( dn.bv_len == 0 ) {
|
||||
*text = "No password is associated with the Root DSE";
|
||||
rc = LDAP_OPERATIONS_ERROR;
|
||||
goto done;
|
||||
}
|
||||
|
||||
rc = dnNormalize2( NULL, &dn, &ndn );
|
||||
if( rc != LDAP_SUCCESS ) {
|
||||
*text = "Invalid DN";
|
||||
goto done;
|
||||
}
|
||||
|
||||
if( 0 ) {
|
||||
retry: /* transaction retry */
|
||||
if ( e != NULL ) {
|
||||
@ -121,7 +132,7 @@ retry: /* transaction retry */
|
||||
op->o_private = &opinfo;
|
||||
|
||||
/* get entry */
|
||||
rc = bdb_dn2entry_w( be, ltid, dn, &e, NULL, 0 );
|
||||
rc = bdb_dn2entry_w( be, ltid, &ndn, &e, NULL, 0 );
|
||||
|
||||
switch(rc) {
|
||||
case DB_LOCK_DEADLOCK:
|
||||
|
Loading…
Reference in New Issue
Block a user