pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/security security: Add cracklib.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/57259ea5b62c
branches:  trunk
changeset: 442287:57259ea5b62c
user:      nia <nia%pkgsrc.org@localhost>
date:      Sun Nov 22 11:36:31 2020 +0000

description:
security: Add cracklib.

CrackLib is a library containing a C function (well, lots of functions
really, but you only need to use one of them) which may be used in a
"passwd"-like program.

The idea is simple: try to prevent users from choosing passwords that
could be guessed by "Crack" by filtering them out, at source.

CrackLib is an offshoot of the the version 5 "Crack" software, and
contains a considerable number of ideas nicked from the new software.

diffstat:

 security/Makefile                               |   3 +-
 security/cracklib/DESCR                         |   9 ++++
 security/cracklib/Makefile                      |  25 +++++++++++
 security/cracklib/PLIST                         |  54 +++++++++++++++++++++++++
 security/cracklib/buildlink3.mk                 |  12 +++++
 security/cracklib/distinfo                      |   9 ++++
 security/cracklib/patches/patch-lib_fascist.c   |  24 +++++++++++
 security/cracklib/patches/patch-lib_rules.c     |  17 +++++++
 security/cracklib/patches/patch-lib_stringlib.c |  15 ++++++
 9 files changed, 167 insertions(+), 1 deletions(-)

diffs (214 lines):

diff -r 8ded3520e330 -r 57259ea5b62c security/Makefile
--- a/security/Makefile Sun Nov 22 11:35:15 2020 +0000
+++ b/security/Makefile Sun Nov 22 11:36:31 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.787 2020/11/21 09:52:47 nia Exp $
+# $NetBSD: Makefile,v 1.788 2020/11/22 11:36:31 nia Exp $
 #
 
 COMMENT=       Security tools
@@ -46,6 +46,7 @@
 SUBDIR+=       codecrypt
 SUBDIR+=       courier-authlib
 SUBDIR+=       crack
+SUBDIR+=       cracklib
 SUBDIR+=       credns
 SUBDIR+=       crypto++
 SUBDIR+=       cvm
diff -r 8ded3520e330 -r 57259ea5b62c security/cracklib/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/cracklib/DESCR   Sun Nov 22 11:36:31 2020 +0000
@@ -0,0 +1,9 @@
+CrackLib is a library containing a C function (well, lots of functions
+really, but you only need to use one of them) which may be used in a
+"passwd"-like program.
+
+The idea is simple: try to prevent users from choosing passwords that
+could be guessed by "Crack" by filtering them out, at source.
+
+CrackLib is an offshoot of the the version 5 "Crack" software, and
+contains a considerable number of ideas nicked from the new software.
diff -r 8ded3520e330 -r 57259ea5b62c security/cracklib/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/cracklib/Makefile        Sun Nov 22 11:36:31 2020 +0000
@@ -0,0 +1,25 @@
+# $NetBSD: Makefile,v 1.1 2020/11/22 11:36:31 nia Exp $
+
+DISTNAME=      cracklib-2.9.7
+CATEGORIES=    security
+MASTER_SITES=  ${MASTER_SITE_GITHUB:=cracklib/}
+GITHUB_RELEASE=        v${PKGVERSION_NOREV}
+EXTRACT_SUFX=  .tar.bz2
+
+MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=      https://github.com/cracklib/cracklib
+COMMENT=       Library used to enforce strong passwords
+LICENSE=       gnu-lgpl-v2.1
+
+USE_LIBTOOL=           yes
+USE_PKGLOCALEDIR=      yes
+GNU_CONFIGURE=         yes
+USE_TOOLS+=            msgfmt msgmerge xgettext
+
+CONFIGURE_ARGS+=       --with-default-dict=${PREFIX}/share/cracklib/cracklib-small
+CONFIGURE_ARGS+=       --without-python
+
+.include "../../converters/libiconv/buildlink3.mk"
+.include "../../devel/gettext-lib/buildlink3.mk"
+.include "../../devel/zlib/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r 8ded3520e330 -r 57259ea5b62c security/cracklib/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/cracklib/PLIST   Sun Nov 22 11:36:31 2020 +0000
@@ -0,0 +1,54 @@
+@comment $NetBSD: PLIST,v 1.1 2020/11/22 11:36:31 nia Exp $
+include/crack.h
+include/packer.h
+lib/libcrack.la
+sbin/cracklib-check
+sbin/cracklib-format
+sbin/cracklib-packer
+sbin/cracklib-unpacker
+sbin/create-cracklib-dict
+share/cracklib/cracklib-small
+share/cracklib/cracklib.magic
+share/locale/as/LC_MESSAGES/cracklib.mo
+share/locale/be/LC_MESSAGES/cracklib.mo
+share/locale/bn_IN/LC_MESSAGES/cracklib.mo
+share/locale/ca/LC_MESSAGES/cracklib.mo
+share/locale/cs/LC_MESSAGES/cracklib.mo
+share/locale/da/LC_MESSAGES/cracklib.mo
+share/locale/de/LC_MESSAGES/cracklib.mo
+share/locale/el/LC_MESSAGES/cracklib.mo
+share/locale/es/LC_MESSAGES/cracklib.mo
+share/locale/eu/LC_MESSAGES/cracklib.mo
+share/locale/fi/LC_MESSAGES/cracklib.mo
+share/locale/fr/LC_MESSAGES/cracklib.mo
+share/locale/gu/LC_MESSAGES/cracklib.mo
+share/locale/he/LC_MESSAGES/cracklib.mo
+share/locale/hi/LC_MESSAGES/cracklib.mo
+share/locale/hu/LC_MESSAGES/cracklib.mo
+share/locale/id/LC_MESSAGES/cracklib.mo
+share/locale/it/LC_MESSAGES/cracklib.mo
+share/locale/ja/LC_MESSAGES/cracklib.mo
+share/locale/kk/LC_MESSAGES/cracklib.mo
+share/locale/kn/LC_MESSAGES/cracklib.mo
+share/locale/ko/LC_MESSAGES/cracklib.mo
+share/locale/lt/LC_MESSAGES/cracklib.mo
+share/locale/ml/LC_MESSAGES/cracklib.mo
+share/locale/mr/LC_MESSAGES/cracklib.mo
+share/locale/nb/LC_MESSAGES/cracklib.mo
+share/locale/nl/LC_MESSAGES/cracklib.mo
+share/locale/or/LC_MESSAGES/cracklib.mo
+share/locale/pa/LC_MESSAGES/cracklib.mo
+share/locale/pl/LC_MESSAGES/cracklib.mo
+share/locale/pt/LC_MESSAGES/cracklib.mo
+share/locale/pt_BR/LC_MESSAGES/cracklib.mo
+share/locale/ru/LC_MESSAGES/cracklib.mo
+share/locale/sk/LC_MESSAGES/cracklib.mo
+share/locale/sl/LC_MESSAGES/cracklib.mo
+share/locale/sq/LC_MESSAGES/cracklib.mo
+share/locale/sv/LC_MESSAGES/cracklib.mo
+share/locale/ta/LC_MESSAGES/cracklib.mo
+share/locale/te/LC_MESSAGES/cracklib.mo
+share/locale/tr/LC_MESSAGES/cracklib.mo
+share/locale/uk/LC_MESSAGES/cracklib.mo
+share/locale/zh_CN/LC_MESSAGES/cracklib.mo
+share/locale/zh_TW/LC_MESSAGES/cracklib.mo
diff -r 8ded3520e330 -r 57259ea5b62c security/cracklib/buildlink3.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/cracklib/buildlink3.mk   Sun Nov 22 11:36:31 2020 +0000
@@ -0,0 +1,12 @@
+# $NetBSD: buildlink3.mk,v 1.1 2020/11/22 11:36:31 nia Exp $
+
+BUILDLINK_TREE+=       cracklib
+
+.if !defined(CRACKLIB_BUILDLINK3_MK)
+CRACKLIB_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.cracklib+=       cracklib>=2.9.7
+BUILDLINK_PKGSRCDIR.cracklib?=         ../../security/cracklib
+.endif # CRACKLIB_BUILDLINK3_MK
+
+BUILDLINK_TREE+=       -cracklib
diff -r 8ded3520e330 -r 57259ea5b62c security/cracklib/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/cracklib/distinfo        Sun Nov 22 11:36:31 2020 +0000
@@ -0,0 +1,9 @@
+$NetBSD: distinfo,v 1.1 2020/11/22 11:36:31 nia Exp $
+
+SHA1 (cracklib-2.9.7.tar.bz2) = b16ef2ff833c72af64bd87577d9acc7a37ed6eb7
+RMD160 (cracklib-2.9.7.tar.bz2) = 2b8b4657948ca18056e9b606d09ca975fba2b676
+SHA512 (cracklib-2.9.7.tar.bz2) = f6bf65ac092ba46ff78ddbc115692260fb76dc71219cd679d2ea935ebfb9e709fbb30259a7406743ed00dbdc415335b3ac9d9fcba1d204ea36d5eb96bf1333a2
+Size (cracklib-2.9.7.tar.bz2) = 603630 bytes
+SHA1 (patch-lib_fascist.c) = de37fed4f5d3b591dc0c3264f852b85d98488cc9
+SHA1 (patch-lib_rules.c) = c479465e18a4d51d8684324772ec841d6e3378f4
+SHA1 (patch-lib_stringlib.c) = 69b4830328b1e99a6d2ee96cda310d7b954f1a65
diff -r 8ded3520e330 -r 57259ea5b62c security/cracklib/patches/patch-lib_fascist.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/cracklib/patches/patch-lib_fascist.c     Sun Nov 22 11:36:31 2020 +0000
@@ -0,0 +1,24 @@
+$NetBSD: patch-lib_fascist.c,v 1.1 2020/11/22 11:36:32 nia Exp $
+
+Argument to ctype functions must be unsigned char.
+
+--- lib/fascist.c.orig 2019-02-14 01:54:41.000000000 +0000
++++ lib/fascist.c
+@@ -28,7 +28,7 @@ typedef unsigned short uint16_t;
+ 
+ #include "packer.h"
+ 
+-#define ISSKIP(x) (isspace(x) || ispunct(x))
++#define ISSKIP(x) (isspace((unsigned char)x) || ispunct((unsigned char)x))
+ 
+ #define MINDIFF 5
+ #define MINLEN 6
+@@ -744,7 +744,7 @@ FascistLookUser(PWDICT *pwp, char *instr
+ 
+     Trim(password);
+ 
+-    while (*password && isspace(*password))
++    while (*password && isspace((unsigned char)*password))
+     {
+       password++;
+     }
diff -r 8ded3520e330 -r 57259ea5b62c security/cracklib/patches/patch-lib_rules.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/cracklib/patches/patch-lib_rules.c       Sun Nov 22 11:36:31 2020 +0000
@@ -0,0 +1,17 @@
+$NetBSD: patch-lib_rules.c,v 1.1 2020/11/22 11:36:32 nia Exp $
+
+Argument to ctype functions must be unsigned char.
+
+--- lib/rules.c.orig   2019-02-14 01:54:41.000000000 +0000
++++ lib/rules.c
+@@ -14,8 +14,8 @@ static const char vers_id[] = "rules.c :
+ #include "crack.h"
+ #include "packer.h"
+ 
+-#define CRACK_TOLOWER(a)        (isupper(a)?tolower(a):(a))
+-#define CRACK_TOUPPER(a)        (islower(a)?toupper(a):(a))
++#define CRACK_TOLOWER(a)        (isupper((unsigned char)a)?tolower((unsigned char)a):(a))
++#define CRACK_TOUPPER(a)        (islower((unsigned char)a)?toupper((unsigned char)a):(a))
+ #define STRCMP(a,b)             strcmp((a),(b))
+ 
+ #if 0
diff -r 8ded3520e330 -r 57259ea5b62c security/cracklib/patches/patch-lib_stringlib.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/cracklib/patches/patch-lib_stringlib.c   Sun Nov 22 11:36:31 2020 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-lib_stringlib.c,v 1.1 2020/11/22 11:36:32 nia Exp $
+
+Argument to ctype functions must be unsigned char.
+
+--- lib/stringlib.c.orig       2019-02-14 01:54:41.000000000 +0000
++++ lib/stringlib.c
+@@ -38,7 +38,7 @@ Trim(string)
+     register char *ptr;
+     for (ptr = string; *ptr; ptr++);
+ 
+-    while ((--ptr >= string) && isspace(*ptr));
++    while ((--ptr >= string) && isspace((unsigned char)*ptr));
+ 
+     *(++ptr) = '\0';
+ 



Home | Main Index | Thread Index | Old Index