From: Pierangelo Masarati Date: Thu, 31 Aug 2006 17:34:01 +0000 (+0000) Subject: minor cleanup X-Git-Tag: OPENLDAP_REL_ENG_2_3_MP~230 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f797bc49a716fc88c8232610f0c1d1db4f910664;p=openldap minor cleanup --- diff --git a/servers/slapd/overlays/ppolicy.c b/servers/slapd/overlays/ppolicy.c index 03452d7288..d078a6352d 100644 --- a/servers/slapd/overlays/ppolicy.c +++ b/servers/slapd/overlays/ppolicy.c @@ -484,13 +484,13 @@ ppolicy_get( Operation *op, Entry *e, PassPolicy *pp ) } if ((a = attr_find( pe->e_attrs, ad_pwdLockout ))) - pp->pwdLockout = !strcmp( a->a_nvals[0].bv_val, "TRUE" ); + pp->pwdLockout = bvmatch( &a->a_nvals[0], &slap_true_bv ); if ((a = attr_find( pe->e_attrs, ad_pwdMustChange ))) - pp->pwdMustChange = !strcmp( a->a_nvals[0].bv_val, "TRUE" ); + pp->pwdMustChange = bvmatch( &a->a_nvals[0], &slap_true_bv ); if ((a = attr_find( pe->e_attrs, ad_pwdAllowUserChange ))) - pp->pwdAllowUserChange = !strcmp( a->a_nvals[0].bv_val, "TRUE" ); + pp->pwdAllowUserChange = bvmatch( &a->a_nvals[0], &slap_true_bv ); if ((a = attr_find( pe->e_attrs, ad_pwdSafeModify ))) - pp->pwdSafeModify = !strcmp( a->a_nvals[0].bv_val, "TRUE" ); + pp->pwdSafeModify = bvmatch( &a->a_nvals[0], &slap_true_bv ); op->o_bd->bd_info = (BackendInfo *)on->on_info; be_entry_release_r( op, pe ); @@ -897,7 +897,8 @@ ppolicy_bind_resp( Operation *op, SlapReply *rs ) */ if ( ppb->pp.pwdMustChange && (a = attr_find( e->e_attrs, ad_pwdReset )) && - !strcmp( a->a_nvals[0].bv_val, "TRUE" ) ) { + bvmatch( &a->a_nvals[0], &slap_true_bv ) ) + { /* * need to inject client controls here to give * more information. For the moment, we ensure