summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-12-04 19:07:09 +0000
committerMike Frysinger <vapier@gentoo.org>2005-12-04 19:07:09 +0000
commit2731d4367da4ce0e8c5caeec1934ed8fbcbaa7ec (patch)
tree15fc3f3e41ecc506df5334ea24c91ba4ea6f865f /sys-apps
parentVersion bump (bug #113585) (diff)
downloadgentoo-2-2731d4367da4ce0e8c5caeec1934ed8fbcbaa7ec.tar.gz
gentoo-2-2731d4367da4ce0e8c5caeec1934ed8fbcbaa7ec.tar.bz2
gentoo-2-2731d4367da4ce0e8c5caeec1934ed8fbcbaa7ec.zip
Fall back to cracklib-words if the words dict doesnt exist #114416.
(Portage version: 2.0.53)
Diffstat (limited to 'sys-apps')
-rw-r--r--sys-apps/util-linux/ChangeLog6
-rw-r--r--sys-apps/util-linux/files/util-linux-2.12r-cracklib-words.patch19
-rw-r--r--sys-apps/util-linux/util-linux-2.12r-r1.ebuild5
3 files changed, 28 insertions, 2 deletions
diff --git a/sys-apps/util-linux/ChangeLog b/sys-apps/util-linux/ChangeLog
index 3adc5a0efd52..c6b382bf8b92 100644
--- a/sys-apps/util-linux/ChangeLog
+++ b/sys-apps/util-linux/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for sys-apps/util-linux
# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/util-linux/ChangeLog,v 1.124 2005/10/15 15:42:58 solar Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/util-linux/ChangeLog,v 1.125 2005/12/04 19:07:09 vapier Exp $
+
+ 04 Dec 2005; Mike Frysinger <vapier@gentoo.org>
+ +files/util-linux-2.12r-cracklib-words.patch, util-linux-2.12r-r1.ebuild:
+ Fall back to cracklib-words if the words dict doesnt exist #114416.
*util-linux-2.12r-r1 (15 Oct 2005)
diff --git a/sys-apps/util-linux/files/util-linux-2.12r-cracklib-words.patch b/sys-apps/util-linux/files/util-linux-2.12r-cracklib-words.patch
new file mode 100644
index 000000000000..30bc7e0be12a
--- /dev/null
+++ b/sys-apps/util-linux/files/util-linux-2.12r-cracklib-words.patch
@@ -0,0 +1,19 @@
+--- misc-utils/look.c
++++ misc-utils/look.c
+@@ -137,7 +137,15 @@
+ *++p = '\0';
+
+ if ((fd = open(file, O_RDONLY, 0)) < 0 || fstat(fd, &sb))
+- err("%s: %s", file, strerror(errno));
++ {
++ /* if opening the primary file failed, fall back to cracklib word files */
++ file = "/usr/share/dict/cracklib-words";
++ if ((fd = open(file, O_RDONLY, 0)) < 0 || fstat(fd, &sb)) {
++ file = "/usr/share/dict/cracklib-small";
++ if ((fd = open(file, O_RDONLY, 0)) < 0 || fstat(fd, &sb))
++ err("%s: %s\n\tplease emerge sys-apps/cracklib-words or sys-apps/miscfiles", file, strerror(errno));
++ }
++ }
+ front = mmap(NULL, (size_t) sb.st_size, PROT_READ,
+ #ifdef MAP_FILE
+ MAP_FILE |
diff --git a/sys-apps/util-linux/util-linux-2.12r-r1.ebuild b/sys-apps/util-linux/util-linux-2.12r-r1.ebuild
index fb46bd42d677..cebe6958f580 100644
--- a/sys-apps/util-linux/util-linux-2.12r-r1.ebuild
+++ b/sys-apps/util-linux/util-linux-2.12r-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/util-linux/util-linux-2.12r-r1.ebuild,v 1.1 2005/10/15 15:42:58 solar Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/util-linux/util-linux-2.12r-r1.ebuild,v 1.2 2005/12/04 19:07:09 vapier Exp $
inherit eutils flag-o-matic toolchain-funcs
@@ -50,6 +50,9 @@ src_unpack() {
# crypto support
use crypt && epatch "${WORKDIR}"/loop-AES-v${LOOP_AES_VER}/${P}.diff
+ # Fall back to cracklib if default words file doesnt exist #114416
+ epatch "${FILESDIR}"/${PN}-2.12r-cracklib-words.patch
+
# Fix rare failures with -j4 or higher
epatch "${FILESDIR}"/${PN}-2.11z-parallel-make.patch