ITS#4634 always init pp->ad

This commit is contained in:
Howard Chu 2006-08-07 22:40:51 +00:00
parent 920af42d5c
commit 9f75c6a43d

View File

@ -416,6 +416,8 @@ ppolicy_get( Operation *op, Entry *e, PassPolicy *pp )
memset( pp, 0, sizeof(PassPolicy) ); memset( pp, 0, sizeof(PassPolicy) );
pp->ad = slap_schema.si_ad_userPassword;
/* Users can change their own password by default */ /* Users can change their own password by default */
pp->pwdAllowUserChange = 1; pp->pwdAllowUserChange = 1;
@ -444,8 +446,6 @@ ppolicy_get( Operation *op, Entry *e, PassPolicy *pp )
#if 0 /* Only worry about userPassword for now */ #if 0 /* Only worry about userPassword for now */
if ((a = attr_find( pe->e_attrs, ad_pwdAttribute ))) if ((a = attr_find( pe->e_attrs, ad_pwdAttribute )))
slap_bv2ad( &a->a_vals[0], &pp->ad, &text ); slap_bv2ad( &a->a_vals[0], &pp->ad, &text );
#else
pp->ad = slap_schema.si_ad_userPassword;
#endif #endif
if ( ( a = attr_find( pe->e_attrs, ad_pwdMinAge ) ) if ( ( a = attr_find( pe->e_attrs, ad_pwdMinAge ) )