freebsd-ports/security/heimdal/files/kpasswdd-cracklib.c
Hiroki Sato 475cf4ae74 - Add LICENSE.
- Build kcm by default.
- Use gssapi.mk.
- Use ${opt}_* variables instead of .if ${PORT_OPTIONS:Mopt} wherever possible.
- Use /var/heimdal as $hdbdir for compatibility with Heimdal in base.
- Merge pkg-plist.* into pkg-plist.
- Remove lines that are no longer valid.
- Remove stale kdc.sh.  rc.d scripts in base system work with this port.
2014-08-30 12:44:54 +00:00

22 lines
474 B
C

#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/pw_dict");
free(p);
return result;
}