aboutsummaryrefslogtreecommitdiffstats
path: root/security/heimdal/files
diff options
context:
space:
mode:
authorshaun <shaun@FreeBSD.org>2007-10-29 21:31:06 +0800
committershaun <shaun@FreeBSD.org>2007-10-29 21:31:06 +0800
commit83cc3ff3a079ea1770d24482c6b34dd502cb0a2e (patch)
tree0a8fecff4aed2bceb4f3f821c409917fc5f3a7a7 /security/heimdal/files
parent9e0a13ae6afb2a521aa6568f82b8e7c9962ccdad (diff)
downloadfreebsd-ports-gnome-83cc3ff3a079ea1770d24482c6b34dd502cb0a2e.tar.gz
freebsd-ports-gnome-83cc3ff3a079ea1770d24482c6b34dd502cb0a2e.tar.zst
freebsd-ports-gnome-83cc3ff3a079ea1770d24482c6b34dd502cb0a2e.zip
Re-add a file (for cracklib support) that was inadvertently removed with
the last update. PR: ports/117351 [1], ports/116864 [2] Submitted by: Koji Yokota <yokota@res.otaru-uc.ac.jp> [1], Matthias Andree <matthias.andree@gmx.de> [2]
Diffstat (limited to 'security/heimdal/files')
-rw-r--r--security/heimdal/files/kpasswdd-cracklib.c.in21
1 files changed, 21 insertions, 0 deletions
diff --git a/security/heimdal/files/kpasswdd-cracklib.c.in b/security/heimdal/files/kpasswdd-cracklib.c.in
new file mode 100644
index 000000000000..6f73c2cdc46d
--- /dev/null
+++ b/security/heimdal/files/kpasswdd-cracklib.c.in
@@ -0,0 +1,21 @@
+#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;
+}