mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-30 13:30:57 +08:00
ITS#4355 timestamps must be normalized
This commit is contained in:
parent
f341270a46
commit
c2b660f3d7
@ -731,8 +731,10 @@ ppolicy_bind_resp( Operation *op, SlapReply *rs )
|
||||
m->sml_type = ad_pwdFailureTime->ad_cname;
|
||||
m->sml_desc = ad_pwdFailureTime;
|
||||
m->sml_values = ch_calloc( sizeof(struct berval), 2 );
|
||||
m->sml_nvalues = ch_calloc( sizeof(struct berval), 2 );
|
||||
|
||||
ber_dupbv( &m->sml_values[0], ×tamp );
|
||||
ber_dupbv( &m->sml_nvalues[0], ×tamp );
|
||||
m->sml_next = mod;
|
||||
mod = m;
|
||||
|
||||
@ -778,7 +780,9 @@ ppolicy_bind_resp( Operation *op, SlapReply *rs )
|
||||
m->sml_type = ad_pwdAccountLockedTime->ad_cname;
|
||||
m->sml_desc = ad_pwdAccountLockedTime;
|
||||
m->sml_values = ch_calloc( sizeof(struct berval), 2 );
|
||||
m->sml_nvalues = ch_calloc( sizeof(struct berval), 2 );
|
||||
ber_dupbv( &m->sml_values[0], ×tamp );
|
||||
ber_dupbv( &m->sml_nvalues[0], ×tamp );
|
||||
m->sml_next = mod;
|
||||
mod = m;
|
||||
}
|
||||
@ -880,7 +884,9 @@ grace:
|
||||
m->sml_type = ad_pwdGraceUseTime->ad_cname;
|
||||
m->sml_desc = ad_pwdGraceUseTime;
|
||||
m->sml_values = ch_calloc( sizeof(struct berval), 2 );
|
||||
m->sml_nvalues = ch_calloc( sizeof(struct berval), 2 );
|
||||
ber_dupbv( &m->sml_values[0], ×tamp );
|
||||
ber_dupbv( &m->sml_nvalues[0], ×tamp );
|
||||
m->sml_next = mod;
|
||||
mod = m;
|
||||
|
||||
@ -1155,7 +1161,7 @@ ppolicy_add(
|
||||
timestamp.bv_len = sizeof(timebuf);
|
||||
slap_timestamp( &now, ×tamp );
|
||||
|
||||
attr_merge_one( op->ora_e, ad_pwdChangedTime, ×tamp, NULL );
|
||||
attr_merge_one( op->ora_e, ad_pwdChangedTime, ×tamp, ×tamp );
|
||||
}
|
||||
}
|
||||
return SLAP_CB_CONTINUE;
|
||||
@ -1568,7 +1574,9 @@ do_modify:
|
||||
if (pwmop != LDAP_MOD_DELETE) {
|
||||
mods->sml_op = LDAP_MOD_REPLACE;
|
||||
mods->sml_values = (BerVarray) ch_malloc( 2 * sizeof( struct berval ) );
|
||||
mods->sml_nvalues = (BerVarray) ch_malloc( 2 * sizeof( struct berval ) );
|
||||
ber_dupbv( &mods->sml_values[0], ×tamp );
|
||||
ber_dupbv( &mods->sml_nvalues[0], ×tamp );
|
||||
mods->sml_values[1].bv_len = 0;
|
||||
mods->sml_values[1].bv_val = NULL;
|
||||
assert( mods->sml_values[0].bv_val != NULL );
|
||||
|
Loading…
Reference in New Issue
Block a user