mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-23 15:23:00 -05:00
ITS#6620: Don't delete absent pwdChangedTime.
Based on patch by Martin Evans.
This commit is contained in:
parent
4ed4c3a28f
commit
50b1c4e1b1
1 changed files with 11 additions and 8 deletions
|
|
@ -1973,23 +1973,26 @@ do_modify:
|
|||
timestamp.bv_len = sizeof(timebuf);
|
||||
slap_timestamp( &now, ×tamp );
|
||||
|
||||
mods = (Modifications *) ch_calloc( sizeof( Modifications ), 1 );
|
||||
mods->sml_desc = ad_pwdChangedTime;
|
||||
mods = NULL;
|
||||
if (pwmop != LDAP_MOD_DELETE) {
|
||||
mods = (Modifications *) ch_calloc( sizeof( Modifications ), 1 );
|
||||
mods->sml_op = LDAP_MOD_REPLACE;
|
||||
mods->sml_numvals = 1;
|
||||
mods->sml_values = (BerVarray) ch_malloc( 2 * sizeof( struct berval ) );
|
||||
ber_dupbv( &mods->sml_values[0], ×tamp );
|
||||
BER_BVZERO( &mods->sml_values[1] );
|
||||
assert( !BER_BVISNULL( &mods->sml_values[0] ) );
|
||||
|
||||
} else {
|
||||
} else if (attr_find(e->e_attrs, ad_pwdChangedTime )) {
|
||||
mods = (Modifications *) ch_calloc( sizeof( Modifications ), 1 );
|
||||
mods->sml_op = LDAP_MOD_DELETE;
|
||||
}
|
||||
mods->sml_flags = SLAP_MOD_INTERNAL;
|
||||
mods->sml_next = NULL;
|
||||
modtail->sml_next = mods;
|
||||
modtail = mods;
|
||||
if (mods) {
|
||||
mods->sml_desc = ad_pwdChangedTime;
|
||||
mods->sml_flags = SLAP_MOD_INTERNAL;
|
||||
mods->sml_next = NULL;
|
||||
modtail->sml_next = mods;
|
||||
modtail = mods;
|
||||
}
|
||||
|
||||
if (attr_find(e->e_attrs, ad_pwdGraceUseTime )) {
|
||||
mods = (Modifications *) ch_calloc( sizeof( Modifications ), 1 );
|
||||
|
|
|
|||
Loading…
Reference in a new issue