Patchwork [2/2] craklib:fix testnum and teststr failed

login
register
mail settings
Submitter Hongxu Jia
Date April 27, 2013, 10:40 a.m.
Message ID <b02de228d1892b8b2f21706af508bc33f3f9e081.1367052630.git.hongxu.jia@windriver.com>
Download mbox | patch
Permalink /patch/48977/
State Accepted
Commit 9c78d2ef5291b29fa313f9d4bf6a81c395207d69
Headers show

Comments

Hongxu Jia - April 27, 2013, 10:40 a.m.
The testnum and teststr are small programs to test cracklib.
Here is error log:
...
$ ./testnum
(null).pwd.gz: No such file or directory
PWOpen: No such file or directory

$ ./util/teststr
(null).pwd.gz: No such file or directory
PWOpen: No such file or directory
...
Set DEFAULT_CRACKLIB_DICT as the path of  PWOpen

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 ...02-craklib-fix-testnum-and-teststr-failed.patch |   53 ++++++++++++++++++++
 meta/recipes-extended/cracklib/cracklib_2.8.22.bb  |    3 +-
 2 files changed, 55 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-extended/cracklib/cracklib/0002-craklib-fix-testnum-and-teststr-failed.patch

Patch

diff --git a/meta/recipes-extended/cracklib/cracklib/0002-craklib-fix-testnum-and-teststr-failed.patch b/meta/recipes-extended/cracklib/cracklib/0002-craklib-fix-testnum-and-teststr-failed.patch
new file mode 100644
index 0000000..6210e82
--- /dev/null
+++ b/meta/recipes-extended/cracklib/cracklib/0002-craklib-fix-testnum-and-teststr-failed.patch
@@ -0,0 +1,53 @@ 
+From 06f9a88b5dd5597f9198ea0cb34f5e96f180e6e3 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Sat, 27 Apr 2013 16:02:30 +0800
+Subject: [PATCH] craklib:fix testnum and teststr failed
+
+Error log:
+...
+$ ./testnum
+(null).pwd.gz: No such file or directory
+PWOpen: No such file or directory
+
+$ ./util/teststr
+(null).pwd.gz: No such file or directory
+PWOpen: No such file or directory
+...
+Set DEFAULT_CRACKLIB_DICT as the path of  PWOpen
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+Upstream-Status: Pending
+---
+ util/testnum.c |    2 +-
+ util/teststr.c |    2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/util/testnum.c b/util/testnum.c
+index ae2246d..ca210ff 100644
+--- a/util/testnum.c
++++ b/util/testnum.c
+@@ -20,7 +20,7 @@ main ()
+     PWDICT *pwp;
+     char buffer[STRINGSIZE];
+ 
+-    if (!(pwp = PWOpen (NULL, "r")))
++    if (!(pwp = PWOpen (DEFAULT_CRACKLIB_DICT, "r")))
+     {
+ 	perror ("PWOpen");
+ 	return (-1);
+diff --git a/util/teststr.c b/util/teststr.c
+index 2a31fa4..9fb9cda 100644
+--- a/util/teststr.c
++++ b/util/teststr.c
+@@ -15,7 +15,7 @@ main ()
+     PWDICT *pwp;
+     char buffer[STRINGSIZE];
+ 
+-    if (!(pwp = PWOpen (NULL, "r")))
++    if (!(pwp = PWOpen (DEFAULT_CRACKLIB_DICT, "r")))
+     {
+ 	perror ("PWOpen");
+ 	return (-1);
+-- 
+1.7.10.4
+
diff --git a/meta/recipes-extended/cracklib/cracklib_2.8.22.bb b/meta/recipes-extended/cracklib/cracklib_2.8.22.bb
index 349c74f..ae5abc4 100644
--- a/meta/recipes-extended/cracklib/cracklib_2.8.22.bb
+++ b/meta/recipes-extended/cracklib/cracklib_2.8.22.bb
@@ -11,7 +11,8 @@  PR ="r0"
 EXTRA_OECONF = "--without-python"
 
 SRC_URI = "${SOURCEFORGE_MIRROR}/cracklib/cracklib-${PV}.tar.gz \
-           file://0001-packlib.c-support-dictionary-byte-order-dependent.patch"
+           file://0001-packlib.c-support-dictionary-byte-order-dependent.patch \
+           file://0002-craklib-fix-testnum-and-teststr-failed.patch"
 
 SRC_URI[md5sum] = "463177b5c29c7a598c991e12a4898e06"
 SRC_URI[sha256sum] = "feaff49bfb513ec10b2618c00d2f7f60776ba93fcc5fa22dd3479dd9cad9f770"