blob: 83be6904ebb39e0d84c38d06b238fdca74f45c1e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#include <stdlib.h>
#include <string.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/cracklib-words");
free(p);
return result;
}
|