* [Buildroot] [PATCH v2 1/2] cracklib: New package
@ 2017-04-05 12:42 Stefan Sørensen
2017-04-05 12:42 ` [Buildroot] [PATCH v2 2/2] libpwquality: " Stefan Sørensen
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Stefan Sørensen @ 2017-04-05 12:42 UTC (permalink / raw)
To: buildroot
Signed-off-by: Stefan S?rensen <stefan.sorensen@spectralink.com>
---
Changes since v1:
* Update DEVELOPERS file
* Use SPDX license codes
* Use the tools from host-cracklib for generating dictionary files
DEVELOPERS | 1 +
package/Config.in | 1 +
package/cracklib/Config.in | 28 ++++++++++++++++++++++++++++
package/cracklib/cracklib.hash | 3 +++
package/cracklib/cracklib.mk | 41 +++++++++++++++++++++++++++++++++++++++++
5 files changed, 74 insertions(+)
create mode 100644 package/cracklib/Config.in
create mode 100644 package/cracklib/cracklib.hash
create mode 100644 package/cracklib/cracklib.mk
diff --git a/DEVELOPERS b/DEVELOPERS
index 37c610e..c31b410 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1467,6 +1467,7 @@ F: package/proxychains-ng/
F: package/yasm/
N: Stefan S?rensen <stefan.sorensen@spectralink.com>
+F: package/cracklib/
F: package/libscrypt/
N: Stephan Hoffmann <sho@relinux.de>
diff --git a/package/Config.in b/package/Config.in
index 71bd44a..66e9201 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1338,6 +1338,7 @@ menu "Other"
source "package/clapack/Config.in"
source "package/classpath/Config.in"
source "package/cppcms/Config.in"
+ source "package/cracklib/Config.in"
source "package/dawgdic/Config.in"
source "package/ding-libs/Config.in"
source "package/eigen/Config.in"
diff --git a/package/cracklib/Config.in b/package/cracklib/Config.in
new file mode 100644
index 0000000..cf428fd
--- /dev/null
+++ b/package/cracklib/Config.in
@@ -0,0 +1,28 @@
+config BR2_PACKAGE_CRACKLIB
+ bool "cracklib"
+ help
+ CrackLib tests passwords to determine whether they match
+ certain security-oriented characteristics, with the purpose
+ of stopping users from choosing passwords that are easy to
+ guess. CrackLib performs several tests on passwords: it
+ tries to generate words from a username and gecos entry and
+ checks those words against the password; it checks for
+ simplistic patterns in passwords; and it checks for the
+ password in a dictionary.
+
+ https://github.com/cracklib/cracklib
+
+if BR2_PACKAGE_CRACKLIB
+
+config BR2_PACKAGE_CRACKLIB_TOOLS
+ bool "install tools"
+ help
+ Install cracklib command line tools for creating dicts.
+
+config BR2_PACKAGE_CRACKLIB_FULL_DICT
+ bool "full dict"
+ help
+ Install the full cracklib dict (requires about 8Mb extra target
+ space).
+
+endif
diff --git a/package/cracklib/cracklib.hash b/package/cracklib/cracklib.hash
new file mode 100644
index 0000000..3038a47
--- /dev/null
+++ b/package/cracklib/cracklib.hash
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256 17cf76943de272fd579ed831a1fd85339b393f8d00bf9e0d17c91e972f583343 cracklib-2.9.6.tar.gz
+sha256 27973245225eeb9d0090e97f3dea4197dec99b64d9d3a791a60298f3b021824c cracklib-words-2.9.6.gz
diff --git a/package/cracklib/cracklib.mk b/package/cracklib/cracklib.mk
new file mode 100644
index 0000000..4e816a8
--- /dev/null
+++ b/package/cracklib/cracklib.mk
@@ -0,0 +1,41 @@
+################################################################################
+#
+# cracklib
+#
+################################################################################
+
+CRACKLIB_VERSION = 2.9.6
+CRACKLIB_SITE = https://github.com/cracklib/cracklib/releases/download/cracklib-$(CRACKLIB_VERSION)
+CRACKLIB_LICENSE = LGPL-2.1
+CRACKLIB_LICENSE_FILES = COPYING.LIB
+CRACKLIB_INSTALL_STAGING = YES
+CRACKLIB_DEPENDENCIES = host-cracklib
+ifeq ($(BR2_PACKAGE_CRACKLIB_FULL_DICT),y)
+CRACKLIB_EXTRA_DOWNLOADS = cracklib-words-$(CRACKLIB_VERSION).gz
+endif
+
+ifeq ($(BR2_PACKAGE_CRACKLIB_TOOLS),)
+define CRACKLIB_REMOVE_TOOLS
+ rm -f $(TARGET_DIR)/usr/sbin/*cracklib*
+endef
+
+CRACKLIB_POST_INSTALL_TARGET_HOOKS += CRACKLIB_REMOVE_TOOLS
+endif
+
+ifeq ($(BR2_PACKAGE_CRACKLIB_FULL_DICT),y)
+CRACKLIB_DICT_SOURCE = $(DL_DIR)/cracklib-words-$(CRACKLIB_VERSION).gz
+else
+CRACKLIB_DICT_SOURCE = $(@D)/dicts/cracklib-small
+endif
+
+define CRACKLIB_BUILD_DICT
+ $(HOST_DIR)/usr/sbin/cracklib-format $(CRACKLIB_DICT_SOURCE) | \
+ $(HOST_DIR)/usr/sbin/cracklib-packer \
+ $(TARGET_DIR)/usr/share/cracklib/pw_dict
+ rm $(TARGET_DIR)/usr/share/cracklib/cracklib-small
+endef
+
+CRACKLIB_POST_INSTALL_TARGET_HOOKS += CRACKLIB_BUILD_DICT
+
+$(eval $(autotools-package))
+$(eval $(host-autotools-package))
--
2.9.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v2 2/2] libpwquality: New package
2017-04-05 12:42 [Buildroot] [PATCH v2 1/2] cracklib: New package Stefan Sørensen
@ 2017-04-05 12:42 ` Stefan Sørensen
2017-04-05 14:31 ` [Buildroot] [PATCH v2 1/2] cracklib: " Danomi Manchego
2017-04-06 15:19 ` Thomas Petazzoni
2 siblings, 0 replies; 5+ messages in thread
From: Stefan Sørensen @ 2017-04-05 12:42 UTC (permalink / raw)
To: buildroot
Signed-off-by: Stefan S?rensen <stefan.sorensen@spectralink.com>
---
Changes since v1:
* Update DEVELOPERS file
* Use SPDX license codes
* Use new github site
* Remove unneeded autoreconf
* Fix building when python is enabled
DEVELOPERS | 1 +
package/Config.in | 1 +
...ith-disable-nls-on-platforms-without-libi.patch | 47 ++++++++++++++++++++++
...leak-in-settings-when-using-bad-word-list.patch | 26 ++++++++++++
package/libpwquality/Config.in | 19 +++++++++
package/libpwquality/libpwquality.hash | 2 +
package/libpwquality/libpwquality.mk | 32 +++++++++++++++
7 files changed, 128 insertions(+)
create mode 100644 package/libpwquality/0001-Fix-build-with-disable-nls-on-platforms-without-libi.patch
create mode 100644 package/libpwquality/0002-Fix-memory-leak-in-settings-when-using-bad-word-list.patch
create mode 100644 package/libpwquality/Config.in
create mode 100644 package/libpwquality/libpwquality.hash
create mode 100644 package/libpwquality/libpwquality.mk
diff --git a/DEVELOPERS b/DEVELOPERS
index c31b410..363df9a 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1468,6 +1468,7 @@ F: package/yasm/
N: Stefan S?rensen <stefan.sorensen@spectralink.com>
F: package/cracklib/
+F: package/libpwquality/
F: package/libscrypt/
N: Stephan Hoffmann <sho@relinux.de>
diff --git a/package/Config.in b/package/Config.in
index 66e9201..2efc1c9 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1381,6 +1381,7 @@ menu "Other"
source "package/libplist/Config.in"
source "package/libpthread-stubs/Config.in"
source "package/libpthsem/Config.in"
+ source "package/libpwquality/Config.in"
source "package/libseccomp/Config.in"
source "package/libsigc/Config.in"
source "package/libsigsegv/Config.in"
diff --git a/package/libpwquality/0001-Fix-build-with-disable-nls-on-platforms-without-libi.patch b/package/libpwquality/0001-Fix-build-with-disable-nls-on-platforms-without-libi.patch
new file mode 100644
index 0000000..4c4a649
--- /dev/null
+++ b/package/libpwquality/0001-Fix-build-with-disable-nls-on-platforms-without-libi.patch
@@ -0,0 +1,47 @@
+From fd1694c9d85666a39fe39e76518581b1ccd5a6c5 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Stefan=20S=C3=B8rensen?= <stefan.sorensen@spectralink.com>
+Date: Thu, 2 Feb 2017 11:16:49 +0100
+Subject: [PATCH 1/2] Fix build with --disable-nls on platforms without libintl
+ included in libc.
+
+Signed-off-by: Stefan S?rensen <stefan.sorensen@spectralink.com>
+
+---
+
+Status: accepted upstream, not yet released.
+
+diff --git a/src/pwmake.c b/src/pwmake.c
+index 5b8cfb8..81f7cd3 100644
+--- a/src/pwmake.c
++++ b/src/pwmake.c
+@@ -33,9 +33,11 @@ main(int argc, char *argv[])
+ int bits;
+ void *auxerror;
+
++#ifdef ENABLE_NLS
+ setlocale(LC_ALL, "");
+ bindtextdomain("libpwquality", "/usr/share/locale");
+ textdomain("libpwquality");
++#endif
+
+ if (argc != 2) {
+ usage(basename(argv[0]));
+diff --git a/src/pwscore.c b/src/pwscore.c
+index 219a175..24c13f2 100644
+--- a/src/pwscore.c
++++ b/src/pwscore.c
+@@ -34,9 +34,11 @@ main(int argc, char *argv[])
+ size_t len;
+ char *user = NULL;
+
++#ifdef ENABLE_NLS
+ setlocale(LC_ALL, "");
+ bindtextdomain("libpwquality", "/usr/share/locale");
+ textdomain("libpwquality");
++#endif
+
+ if (argc > 2) {
+ usage(basename(argv[0]));
+--
+2.9.3
+
diff --git a/package/libpwquality/0002-Fix-memory-leak-in-settings-when-using-bad-word-list.patch b/package/libpwquality/0002-Fix-memory-leak-in-settings-when-using-bad-word-list.patch
new file mode 100644
index 0000000..678a33a
--- /dev/null
+++ b/package/libpwquality/0002-Fix-memory-leak-in-settings-when-using-bad-word-list.patch
@@ -0,0 +1,26 @@
+From b1f2f1f71894fa0af92041fb4d5b6146101d63e5 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Stefan=20S=C3=B8rensen?= <stefan.sorensen@spectralink.com>
+Date: Thu, 2 Feb 2017 11:17:26 +0100
+Subject: [PATCH 2/2] Fix memory leak in settings when using bad word list.
+
+Signed-off-by: Stefan S?rensen <stefan.sorensen@spectralink.com>
+
+---
+
+Status: accepted upstream, not yet released.
+
+diff --git a/src/settings.c b/src/settings.c
+index 5c38b30..4b026b1 100644
+--- a/src/settings.c
++++ b/src/settings.c
+@@ -46,6 +46,7 @@ pwquality_free_settings(pwquality_settings_t *pwq)
+ {
+ if (pwq) {
+ free(pwq->dict_path);
++ free(pwq->bad_words);
+ free(pwq);
+ }
+ }
+--
+2.9.3
+
diff --git a/package/libpwquality/Config.in b/package/libpwquality/Config.in
new file mode 100644
index 0000000..4e85525
--- /dev/null
+++ b/package/libpwquality/Config.in
@@ -0,0 +1,19 @@
+config BR2_PACKAGE_LIBPWQUALITY
+ bool "libpwquality"
+ help
+ This is a library for password quality checks and generation
+ of random passwords that pass the checks. This library uses
+ the cracklib and cracklib dictionaries to perform some of
+ the checks.
+
+ https://github.com/libpwquality/libpwquality
+
+if BR2_PACKAGE_LIBPWQUALITY
+
+config BR2_PACKAGE_LIBPWQUALITY_TOOLS
+ bool "install tools"
+ help
+ Install libpwquality command line tools generating/checking
+ passwords.
+
+endif
diff --git a/package/libpwquality/libpwquality.hash b/package/libpwquality/libpwquality.hash
new file mode 100644
index 0000000..0e3f9e3
--- /dev/null
+++ b/package/libpwquality/libpwquality.hash
@@ -0,0 +1,2 @@
+# Locally calculated
+sha256 74d2ea90e103323c1f2d6a6cc9617cdae6877573eddb31aaf31a40f354cc2d2a libpwquality-1.3.0.tar.bz2
diff --git a/package/libpwquality/libpwquality.mk b/package/libpwquality/libpwquality.mk
new file mode 100644
index 0000000..4236ebd
--- /dev/null
+++ b/package/libpwquality/libpwquality.mk
@@ -0,0 +1,32 @@
+################################################################################
+#
+# libpwquality
+#
+################################################################################
+
+LIBPWQUALITY_VERSION = 1.3.0
+LIBPWQUALITY_SOURCE = libpwquality-$(LIBPWQUALITY_VERSION).tar.bz2
+LIBPWQUALITY_SITE = $(call github,libpwquality,libpwquality,$(LIBPWQUALITY_VERSION))
+LIBPWQUALITY_LICENSE = BSD-3-Clause or GPL-2.0+
+LIBPWQUALITY_INSTALL_STAGING = YES
+LIBPWQUALITY_DEPENDENCIES = cracklib
+LIBPWQUALITY_LICENSE_FILES = COPYING
+
+ifeq ($(BR2_PACKAGE_PYTHON),y)
+LIBPWQUALITY_CONF_OPTS += --enable-python-bindings
+LIBPWQUALITY_DEPENDENCIES += python
+LIBPWQUALITY_MAKE_ENV += $(PKG_PYTHON_DISTUTILS_ENV)
+else
+LIBPWQUALITY_CONF_OPTS += --disable-python-bindings
+endif
+
+ifeq ($(BR2_PACKAGE_LIBPWQUALITY_TOOLS),)
+define LIBPWQUALITY_REMOVE_TOOLS
+ rm -f $(TARGET_DIR)/usr/bin/pwmake
+ rm -f $(TARGET_DIR)/usr/bin/pwscore
+endef
+
+LIBPWQUALITY_POST_INSTALL_TARGET_HOOKS += LIBPWQUALITY_REMOVE_TOOLS
+endif
+
+$(eval $(autotools-package))
--
2.9.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v2 1/2] cracklib: New package
2017-04-05 12:42 [Buildroot] [PATCH v2 1/2] cracklib: New package Stefan Sørensen
2017-04-05 12:42 ` [Buildroot] [PATCH v2 2/2] libpwquality: " Stefan Sørensen
@ 2017-04-05 14:31 ` Danomi Manchego
2017-04-06 15:19 ` Thomas Petazzoni
2 siblings, 0 replies; 5+ messages in thread
From: Danomi Manchego @ 2017-04-05 14:31 UTC (permalink / raw)
To: buildroot
Stefan,
On Wed, Apr 5, 2017 at 8:42 AM, Stefan S?rensen
<stefan.sorensen@spectralink.com> wrote:
> Signed-off-by: Stefan S?rensen <stefan.sorensen@spectralink.com>
> ---
>
> Changes since v1:
>
> * Update DEVELOPERS file
> * Use SPDX license codes
> * Use the tools from host-cracklib for generating dictionary files
>
> DEVELOPERS | 1 +
> package/Config.in | 1 +
> package/cracklib/Config.in | 28 ++++++++++++++++++++++++++++
> package/cracklib/cracklib.hash | 3 +++
> package/cracklib/cracklib.mk | 41 +++++++++++++++++++++++++++++++++++++++++
> 5 files changed, 74 insertions(+)
> create mode 100644 package/cracklib/Config.in
> create mode 100644 package/cracklib/cracklib.hash
> create mode 100644 package/cracklib/cracklib.mk
>
> diff --git a/DEVELOPERS b/DEVELOPERS
> index 37c610e..c31b410 100644
> --- a/DEVELOPERS
> +++ b/DEVELOPERS
> @@ -1467,6 +1467,7 @@ F: package/proxychains-ng/
> F: package/yasm/
>
> N: Stefan S?rensen <stefan.sorensen@spectralink.com>
> +F: package/cracklib/
> F: package/libscrypt/
>
> N: Stephan Hoffmann <sho@relinux.de>
> diff --git a/package/Config.in b/package/Config.in
> index 71bd44a..66e9201 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -1338,6 +1338,7 @@ menu "Other"
> source "package/clapack/Config.in"
> source "package/classpath/Config.in"
> source "package/cppcms/Config.in"
> + source "package/cracklib/Config.in"
> source "package/dawgdic/Config.in"
> source "package/ding-libs/Config.in"
> source "package/eigen/Config.in"
> diff --git a/package/cracklib/Config.in b/package/cracklib/Config.in
> new file mode 100644
> index 0000000..cf428fd
> --- /dev/null
> +++ b/package/cracklib/Config.in
> @@ -0,0 +1,28 @@
> +config BR2_PACKAGE_CRACKLIB
> + bool "cracklib"
> + help
> + CrackLib tests passwords to determine whether they match
> + certain security-oriented characteristics, with the purpose
> + of stopping users from choosing passwords that are easy to
> + guess. CrackLib performs several tests on passwords: it
> + tries to generate words from a username and gecos entry and
> + checks those words against the password; it checks for
> + simplistic patterns in passwords; and it checks for the
> + password in a dictionary.
> +
> + https://github.com/cracklib/cracklib
> +
> +if BR2_PACKAGE_CRACKLIB
> +
> +config BR2_PACKAGE_CRACKLIB_TOOLS
> + bool "install tools"
> + help
> + Install cracklib command line tools for creating dicts.
> +
> +config BR2_PACKAGE_CRACKLIB_FULL_DICT
> + bool "full dict"
> + help
> + Install the full cracklib dict (requires about 8Mb extra target
> + space).
> +
> +endif
> diff --git a/package/cracklib/cracklib.hash b/package/cracklib/cracklib.hash
> new file mode 100644
> index 0000000..3038a47
> --- /dev/null
> +++ b/package/cracklib/cracklib.hash
> @@ -0,0 +1,3 @@
> +# Locally calculated
> +sha256 17cf76943de272fd579ed831a1fd85339b393f8d00bf9e0d17c91e972f583343 cracklib-2.9.6.tar.gz
> +sha256 27973245225eeb9d0090e97f3dea4197dec99b64d9d3a791a60298f3b021824c cracklib-words-2.9.6.gz
> diff --git a/package/cracklib/cracklib.mk b/package/cracklib/cracklib.mk
> new file mode 100644
> index 0000000..4e816a8
> --- /dev/null
> +++ b/package/cracklib/cracklib.mk
> @@ -0,0 +1,41 @@
> +################################################################################
> +#
> +# cracklib
> +#
> +################################################################################
> +
> +CRACKLIB_VERSION = 2.9.6
> +CRACKLIB_SITE = https://github.com/cracklib/cracklib/releases/download/cracklib-$(CRACKLIB_VERSION)
> +CRACKLIB_LICENSE = LGPL-2.1
> +CRACKLIB_LICENSE_FILES = COPYING.LIB
> +CRACKLIB_INSTALL_STAGING = YES
> +CRACKLIB_DEPENDENCIES = host-cracklib
> +ifeq ($(BR2_PACKAGE_CRACKLIB_FULL_DICT),y)
> +CRACKLIB_EXTRA_DOWNLOADS = cracklib-words-$(CRACKLIB_VERSION).gz
> +endif
You could move the CRACKLIB_EXTRA_DOWNLOADS assignment down to the
if-BR2_PACKAGE_CRACKLIB_FULL_DICT below, where cracklib-words is
actually used, and eliminate an if.
> +
> +ifeq ($(BR2_PACKAGE_CRACKLIB_TOOLS),)
> +define CRACKLIB_REMOVE_TOOLS
> + rm -f $(TARGET_DIR)/usr/sbin/*cracklib*
> +endef
> +
> +CRACKLIB_POST_INSTALL_TARGET_HOOKS += CRACKLIB_REMOVE_TOOLS
> +endif
> +
> +ifeq ($(BR2_PACKAGE_CRACKLIB_FULL_DICT),y)
> +CRACKLIB_DICT_SOURCE = $(DL_DIR)/cracklib-words-$(CRACKLIB_VERSION).gz
> +else
> +CRACKLIB_DICT_SOURCE = $(@D)/dicts/cracklib-small
> +endif
> +
> +define CRACKLIB_BUILD_DICT
> + $(HOST_DIR)/usr/sbin/cracklib-format $(CRACKLIB_DICT_SOURCE) | \
> + $(HOST_DIR)/usr/sbin/cracklib-packer \
> + $(TARGET_DIR)/usr/share/cracklib/pw_dict
Maybe it would be wise to preface this line with a $(HOST_MAKE_ENV)
just in case cracklib-format or cracklib-packer make use of any other
cracklib tools?
No need to mkdir -p $(TARGET_DIR)/usr/share/cracklib first?
Regards,
Danomi -
> + rm $(TARGET_DIR)/usr/share/cracklib/cracklib-small
> +endef
> +
> +CRACKLIB_POST_INSTALL_TARGET_HOOKS += CRACKLIB_BUILD_DICT
> +
> +$(eval $(autotools-package))
> +$(eval $(host-autotools-package))
> --
> 2.9.3
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v2 1/2] cracklib: New package
2017-04-05 12:42 [Buildroot] [PATCH v2 1/2] cracklib: New package Stefan Sørensen
2017-04-05 12:42 ` [Buildroot] [PATCH v2 2/2] libpwquality: " Stefan Sørensen
2017-04-05 14:31 ` [Buildroot] [PATCH v2 1/2] cracklib: " Danomi Manchego
@ 2017-04-06 15:19 ` Thomas Petazzoni
2017-04-06 20:29 ` Danomi Manchego
2 siblings, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2017-04-06 15:19 UTC (permalink / raw)
To: buildroot
Hello Stefan,
On Wed, 5 Apr 2017 14:42:33 +0200, Stefan S?rensen wrote:
> Signed-off-by: Stefan S?rensen <stefan.sorensen@spectralink.com>
> ---
I still see the same behavior:
/home/thomas/projets/buildroot/output/host/usr/sbin/cracklib-format /home/thomas/dl/cracklib-words-2.9.6.gz | /home/thomas/projets/buildroot/output/host/usr/sbin/cracklib-packer /home/thomas/projets/buildroot/output/target/usr/share/cracklib/pw_dict
skipping line: 1
4 3
rm /home/thomas/projets/buildroot/output/target/usr/share/cracklib/cracklib-small
And then in the target:
$ ls -l output/target/usr/share/cracklib/*
-rw-r--r-- 1 thomas thomas 360 avril 6 17:17 output/target/usr/share/cracklib/cracklib.magic
-rw-r--r-- 1 thomas thomas 1024 avril 6 17:17 output/target/usr/share/cracklib/pw_dict.hwm
-rw-r--r-- 1 thomas thomas 50 avril 6 17:17 output/target/usr/share/cracklib/pw_dict.pwd
-rw-r--r-- 1 thomas thomas 16 avril 6 17:17 output/target/usr/share/cracklib/pw_dict.pwi
i.e, the dictionary is empty (size is ridiculously small).
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v2 1/2] cracklib: New package
2017-04-06 15:19 ` Thomas Petazzoni
@ 2017-04-06 20:29 ` Danomi Manchego
0 siblings, 0 replies; 5+ messages in thread
From: Danomi Manchego @ 2017-04-06 20:29 UTC (permalink / raw)
To: buildroot
On Thu, Apr 6, 2017 at 11:19 AM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Hello Stefan,
>
> On Wed, 5 Apr 2017 14:42:33 +0200, Stefan S?rensen wrote:
>> Signed-off-by: Stefan S?rensen <stefan.sorensen@spectralink.com>
>> ---
>
> I still see the same behavior:
>
> /home/thomas/projets/buildroot/output/host/usr/sbin/cracklib-format /home/thomas/dl/cracklib-words-2.9.6.gz | /home/thomas/projets/buildroot/output/host/usr/sbin/cracklib-packer /home/thomas/projets/buildroot/output/target/usr/share/cracklib/pw_dict
> skipping line: 1
> 4 3
> rm /home/thomas/projets/buildroot/output/target/usr/share/cracklib/cracklib-small
>
> And then in the target:
>
> $ ls -l output/target/usr/share/cracklib/*
> -rw-r--r-- 1 thomas thomas 360 avril 6 17:17 output/target/usr/share/cracklib/cracklib.magic
> -rw-r--r-- 1 thomas thomas 1024 avril 6 17:17 output/target/usr/share/cracklib/pw_dict.hwm
> -rw-r--r-- 1 thomas thomas 50 avril 6 17:17 output/target/usr/share/cracklib/pw_dict.pwd
> -rw-r--r-- 1 thomas thomas 16 avril 6 17:17 output/target/usr/share/cracklib/pw_dict.pwi
>
> i.e, the dictionary is empty (size is ridiculously small).
FWIW - it looks to me like the grep call in cracklib-format is
concluding that cracklib-words is a binary file:
buildroot/output/host/usr/sbin/cracklib-format cracklib-words-2.9.6.gz
]
]]
binaryfilestandardinputmatches
If the grep is patched to have a -a to force the file to be treated as
text, then you get big numbers:
skipping line: 1
warning: input out of order: 'ghabcdefghabcdefghabcdefghabcd'
should not follow 'habcdefghabcdefghabcdefghabcde' (line 55362)
warning: input out of order: 'fghabcdefghabcdefghabcdefghabc'
should not follow 'ghabcdefghabcdefghabcdefghabcd' (line 55363)
warning: input out of order: 'efghabcdefghabcdefghabcdefghab'
should not follow 'fghabcdefghabcdefghabcdefghabc' (line 55364)
warning: input out of order: 'fghabcdefghabcdefghabcdefghabc'
should not follow 'ghabcdefghabcdefghabcdefghabcd' (line 55366)
warning: input out of order: 'abcdefghi' should not follow
'fghabcdefghabcdefghabcdefghabc' (line 55367)
1911513 1911512
Or, if you use an older cracklib-words, like
http://downloads.sourceforge.net/cracklib/cracklib-words-20080507.gz,
then this problem is also avoided.
Danomi -
>
> Thomas
> --
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux, Kernel and Android engineering
> http://free-electrons.com
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-04-06 20:29 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-05 12:42 [Buildroot] [PATCH v2 1/2] cracklib: New package Stefan Sørensen
2017-04-05 12:42 ` [Buildroot] [PATCH v2 2/2] libpwquality: " Stefan Sørensen
2017-04-05 14:31 ` [Buildroot] [PATCH v2 1/2] cracklib: " Danomi Manchego
2017-04-06 15:19 ` Thomas Petazzoni
2017-04-06 20:29 ` Danomi Manchego
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.