freebsd-ports/security/heimdal/files/kpasswdd-cracklib.c.in
Jacques Vidrine a1d4de67f0 = Add support for using cracklib with kpasswdd, the password changing
daemon.
= Fix a bug in `ktutil get' which was causing a segfault.
= Bump PORTREVISION.
2001-10-29 13:02:43 +00:00

21 lines
457 B
C

#include <stdlib.h>
#include <krb5.h>
#include <packer.h>
int version = 0;
const char *
passwd_check(krb5_context context, krb5_principal principal,
krb5_data *password)
{
char *p, *result;
p = malloc(password->length + 1);
if (p == NULL)
return "out of memory";
memcpy(p, password->data, password->length);
p[password->length] = '\0';
result = FascistCheck(p, "%%LOCALBASE%%/libdata/cracklib/pw_dict");
free(p);
return result;
}