goto return_results;
}
- if ( slap_passwd_check( a->a_vals, cred, a->a_syntax, 0, cred ) != 0 )
- {
+ if ( slap_passwd_check( a, cred ) != 0 ) {
send_ldap_result( conn, op, LDAP_INVALID_CREDENTIALS,
NULL, NULL, NULL, NULL);
/* stop front end from sending result */
goto return_results;
}
- if ( slap_passwd_check( a->a_vals, cred, a->a_syntax, 0, cred ) != 0 )
- {
+ if ( slap_passwd_check( a, cred ) != 0 ) {
send_ldap_result( conn, op, LDAP_INVALID_CREDENTIALS,
NULL, NULL, NULL, NULL );
/* stop front end from sending result */
int
slap_passwd_check(
- struct berval **vals,
- struct berval *v,
- int syntax,
- int normalize,
+ Attribute *a,
struct berval *cred
)
{
int i;
- for ( i = 0; vals[i] != NULL; i++ ) {
- if ( syntax == SYNTAX_BIN ) {
+ for ( i = 0; a->a_vals[i] != NULL; i++ ) {
+ if ( a->a_syntax == SYNTAX_BIN ) {
int result;
#ifdef SLAPD_CRYPT
result = lutil_passwd(
(char*) cred->bv_val,
- (char*) vals[i]->bv_val,
+ (char*) a->a_vals[i]->bv_val,
NULL );
#ifdef SLAPD_CRYPT
return result;
} else {
- if ( value_cmp( vals[i], v, syntax, normalize ) == 0 ) {
+ if ( value_cmp( a->a_vals[i], cred, a->a_syntax, 1 ) == 0 ) {
return( 0 );
}
}
* passwd.c
*/
LIBSLAPD_F (int) slap_passwd_check(
- struct berval **vals,
- struct berval *v,
- int syntax,
- int normalize,
+ Attribute *attr,
struct berval *cred );
/*