const struct berval *passwd );
#endif
+#ifdef SLAPD_CLEARTEXT
+static struct berval *hash_clear(
+ const struct pw_scheme *scheme,
+ const struct berval *passwd );
+#endif
static const struct pw_scheme pw_schemes[] =
{
#ifdef SLAPD_CLEARTEXT
/* psuedo scheme */
- { {0, "{CLEARTEXT}"}, NULL, NULL },
+ { {0, "{CLEARTEXT}"}, NULL, hash_clear },
#endif
{ {0, NULL}, NULL, NULL }
int i;
for( i=0; pw_schemes[i].name.bv_val; i++) {
- if( pw_schemes[i].name.bv_len == 0 ) continue;
+ if( pw_schemes[i].name.bv_val == NULL ) continue;
- if( strncasecmp(scheme, pw_schemes[i].name.bv_val,
- pw_schemes[i].name.bv_len) == 0 )
- {
+ if( strcasecmp(scheme, pw_schemes[i].name.bv_val ) == 0 ) {
return &pw_schemes[i];
}
}
return 0;
}
+
+#ifdef SLAPD_CLEARTEXT
+static struct berval *hash_clear(
+ const struct pw_scheme *scheme,
+ const struct berval *passwd )
+{
+ return ber_bvdup( (struct berval *) passwd );
+}
+#endif
+
+