From: Howard Chu Date: Thu, 19 Jan 2006 22:16:23 +0000 (+0000) Subject: ITS#4355 timestamps must be normalized X-Git-Tag: OPENLDAP_REL_ENG_2_4_BP~283 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c2b660f3d723c04f6452d54bb8724f0e0e163f64;p=openldap ITS#4355 timestamps must be normalized --- diff --git a/servers/slapd/overlays/ppolicy.c b/servers/slapd/overlays/ppolicy.c index 3403e80847..bed5b4b366 100644 --- a/servers/slapd/overlays/ppolicy.c +++ b/servers/slapd/overlays/ppolicy.c @@ -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 );