From ca9627e70852f6b2e835660df870fe3ab405882d Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Sun, 1 Sep 2019 00:00:32 +0200 Subject: Initial import --- .../files/util-linux-2.12r-cracklib-words.patch | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 sys-apps/util-linux/files/util-linux-2.12r-cracklib-words.patch (limited to 'sys-apps/util-linux/files/util-linux-2.12r-cracklib-words.patch') 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 0000000..30bc7e0 --- /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 | -- cgit v1.2.3