From f797bc49a716fc88c8232610f0c1d1db4f910664 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Thu, 31 Aug 2006 17:34:01 +0000 Subject: [PATCH] minor cleanup --- servers/slapd/overlays/ppolicy.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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 -- 2.39.5