update to 2.9.11

- Resolves: rhbz#2123955 cracklib-2.9.11 is available
- Remove old patches, port remaining patches to 2.9.11
- Use man pages from doc/ instead of pulling them from debian
This commit is contained in:
Paul Wouters 2023-07-07 17:59:06 -04:00
parent 1a51e53e47
commit d2f5af3f9e
No known key found for this signature in database
GPG Key ID: DB48D2E5122468BF
14 changed files with 138 additions and 4496 deletions

2
.gitignore vendored
View File

@ -58,3 +58,5 @@ cracklib-2.8.16.tar.gz
/cracklib-words-2.9.7.gz
/cracklib2_2.9.2-1.debian.tar.xz
/cracklib2_2.9.2-1.dsc
/cracklib-2.9.11.tar.gz
/cracklib-words-2.9.11.gz

View File

@ -1,104 +0,0 @@
diff -up cracklib-2.9.0/python/_cracklib.c.gzdicts cracklib-2.9.0/python/_cracklib.c
--- cracklib-2.9.0/python/_cracklib.c.gzdicts 2013-06-01 16:47:13.000000000 +0200
+++ cracklib-2.9.0/python/_cracklib.c 2013-08-20 12:37:32.028611493 +0200
@@ -23,6 +23,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "config.h"
#ifdef PYTHON_H
#include PYTHON_H
#else
@@ -72,9 +73,8 @@ static char _cracklib_FascistCheck_doc [
static PyObject *
_cracklib_FascistCheck(PyObject *self, PyObject *args, PyObject *kwargs)
{
- char *candidate, *dict;
- char *defaultdict = NULL;
- const char *result;
+ char *candidate;
+ const char *result, *dict;
struct stat st;
char *keywords[] = {"pw", "dictpath", NULL};
char *dictfile;
@@ -103,44 +103,35 @@ _cracklib_FascistCheck(PyObject *self, P
"second argument was not an absolute path!");
return NULL;
}
- dictfile = malloc(strlen(dict) + sizeof(DICT_SUFFIX));
- if (dictfile == NULL)
- {
- PyErr_SetFromErrnoWithFilename(PyExc_OSError, dict);
- return NULL;
- }
- sprintf(dictfile, "%s" DICT_SUFFIX, dict);
- if (lstat(dictfile, &st) == -1)
- {
- PyErr_SetFromErrnoWithFilename(PyExc_OSError, dictfile);
- free(dictfile);
- return NULL;
- }
- free(dictfile);
} else
{
- defaultdict = strdup(GetDefaultCracklibDict());
- if (errno == ENOMEM) {
- PyErr_SetFromErrno(PyExc_OSError);
- return NULL;
- }
- dictfile = malloc(strlen(defaultdict) + sizeof(DICT_SUFFIX));
- if (dictfile == NULL)
- {
- PyErr_SetFromErrnoWithFilename(PyExc_OSError, defaultdict);
- free(defaultdict);
- return NULL;
- }
- sprintf(dictfile, "%s" DICT_SUFFIX, defaultdict);
+ /* No need to strdup() anything as this is a constant value */
+ dict = GetDefaultCracklibDict();
+ }
+
+ dictfile = malloc(strlen(dict) + sizeof(DICT_SUFFIX) + 3);
+ if (dictfile == NULL)
+ {
+ PyErr_SetFromErrnoWithFilename(PyExc_OSError, dict);
+ return NULL;
+ }
+ sprintf(dictfile, "%s" DICT_SUFFIX, dict);
+ if (lstat(dictfile, &st) == -1)
+ {
+#ifdef HAVE_ZLIB_H
+ sprintf(dictfile, "%s" DICT_SUFFIX ".gz", dict);
if (lstat(dictfile, &st) == -1)
{
+ sprintf(dictfile, "%s" DICT_SUFFIX, dict);
+#endif
PyErr_SetFromErrnoWithFilename(PyExc_OSError, dictfile);
- free(defaultdict);
free(dictfile);
return NULL;
+#ifdef HAVE_ZLIB_H
}
- free(dictfile);
+#endif
}
+ free(dictfile);
setlocale(LC_ALL, "");
#ifdef ENABLE_NLS
@@ -148,14 +139,9 @@ _cracklib_FascistCheck(PyObject *self, P
#endif
LOCK();
- result = FascistCheck(candidate, dict ? dict : defaultdict);
+ result = FascistCheck(candidate, dict);
UNLOCK();
- if (defaultdict != NULL)
- {
- free(defaultdict);
- }
-
if (result != NULL)
{
PyErr_SetString(PyExc_ValueError, result);

View File

@ -1,22 +0,0 @@
Do not depend on config.h in public header.
diff -up cracklib-2.9.1/lib/packer.h.inttypes cracklib-2.9.1/lib/packer.h
--- cracklib-2.9.1/lib/packer.h.inttypes 2013-12-03 15:00:15.000000000 +0100
+++ cracklib-2.9.1/lib/packer.h 2013-12-09 09:07:38.306394809 +0100
@@ -30,17 +30,7 @@
#define _(String) (String)
#endif
-#if defined(HAVE_INTTYPES_H)
-#include <inttypes.h>
-#else
-#if defined(HAVE_STDINT_H)
#include <stdint.h>
-#else
-typedef unsigned int uint32_t;
-typedef unsigned short uint16_t;
-#endif
-#endif
-
struct pi_header
{

View File

@ -1,6 +1,6 @@
diff -Naur cracklib-2.9.7-orig/lib/fascist.c cracklib-2.9.7/lib/fascist.c
--- cracklib-2.9.7-orig/lib/fascist.c 2019-02-13 20:54:41.000000000 -0500
+++ cracklib-2.9.7/lib/fascist.c 2022-03-07 14:48:53.348146748 -0500
diff -Naur cracklib-2.9.11-orig/lib/fascist.c cracklib-2.9.11/lib/fascist.c
--- cracklib-2.9.11-orig/lib/fascist.c 2019-02-13 20:54:41.000000000 -0500
+++ cracklib-2.9.11/lib/fascist.c 2023-07-07 18:20:42.239904964 -0400
@@ -36,8 +36,8 @@
#undef DEBUG
#undef DEBUG2
@ -103,9 +103,9 @@ diff -Naur cracklib-2.9.7-orig/lib/fascist.c cracklib-2.9.7/lib/fascist.c
{
continue;
}
diff -Naur cracklib-2.9.7-orig/lib/packer.h cracklib-2.9.7/lib/packer.h
--- cracklib-2.9.7-orig/lib/packer.h 2022-03-07 14:47:42.224763853 -0500
+++ cracklib-2.9.7/lib/packer.h 2022-03-07 14:48:53.349146753 -0500
diff -Naur cracklib-2.9.11-orig/lib/packer.h cracklib-2.9.11/lib/packer.h
--- cracklib-2.9.11-orig/lib/packer.h 2023-03-04 11:00:49.000000000 -0500
+++ cracklib-2.9.11/lib/packer.h 2023-07-07 18:21:04.315119032 -0400
@@ -82,7 +82,7 @@
extern unsigned int FindPW(PWDICT *pwp, char *string);
extern int PutPW(PWDICT *pwp, char *string);
@ -115,10 +115,10 @@ diff -Naur cracklib-2.9.7-orig/lib/packer.h cracklib-2.9.7/lib/packer.h
extern char Chop(char *string);
extern char *Trim(char *string);
extern char *FascistLook(PWDICT *pwp, char *instring);
diff -Naur cracklib-2.9.7-orig/lib/packlib.c cracklib-2.9.7/lib/packlib.c
--- cracklib-2.9.7-orig/lib/packlib.c 2019-02-13 20:54:41.000000000 -0500
+++ cracklib-2.9.7/lib/packlib.c 2022-03-07 14:48:53.349146753 -0500
@@ -67,8 +67,8 @@
diff -Naur cracklib-2.9.11-orig/lib/packlib.c cracklib-2.9.11/lib/packlib.c
--- cracklib-2.9.11-orig/lib/packlib.c 2023-03-04 11:00:49.000000000 -0500
+++ cracklib-2.9.11/lib/packlib.c 2023-07-07 18:44:55.183214284 -0400
@@ -65,8 +65,8 @@
char *mode;
{
int use64 = 0;
@ -129,7 +129,7 @@ diff -Naur cracklib-2.9.7-orig/lib/packlib.c cracklib-2.9.7/lib/packlib.c
char iname[STRINGSIZE];
char dname[STRINGSIZE];
char wname[STRINGSIZE];
@@ -76,13 +76,11 @@
@@ -74,13 +74,11 @@
void *ifp;
void *wfp;
@ -146,7 +146,7 @@ diff -Naur cracklib-2.9.7-orig/lib/packlib.c cracklib-2.9.7/lib/packlib.c
memset(&pdesc64, '\0', sizeof(pdesc64));
snprintf(iname, STRINGSIZE, "%s.pwi", prefix);
@@ -91,77 +89,80 @@
@@ -89,77 +87,80 @@
if (mode[0] == 'r')
{
@ -195,7 +195,7 @@ diff -Naur cracklib-2.9.7-orig/lib/packlib.c cracklib-2.9.7/lib/packlib.c
#ifdef HAVE_ZLIB_H
- if (pdesc.flags & PFOR_USEZLIB)
- gzclose(pdesc.dfp);
+ if(pdesc->flags & PFOR_USEZLIB)
+ if (pdesc->flags & PFOR_USEZLIB)
+ gzclose(pdesc->dfp);
else
#endif
@ -247,11 +247,11 @@ diff -Naur cracklib-2.9.7-orig/lib/packlib.c cracklib-2.9.7/lib/packlib.c
fclose(ifp);
#ifdef HAVE_ZLIB_H
- if (pdesc.flags & PFOR_USEZLIB)
+ if(pdesc->flags & PFOR_USEZLIB)
+ if (pdesc->flags & PFOR_USEZLIB)
gzclose(dfp);
else
#endif
@@ -170,10 +171,11 @@
@@ -168,10 +169,11 @@
{
fclose(wfp);
}
@ -264,7 +264,7 @@ diff -Naur cracklib-2.9.7-orig/lib/packlib.c cracklib-2.9.7/lib/packlib.c
{
/* uh-oh. either a broken "64-bit" file or a garbage file. */
rewind (ifp);
@@ -181,10 +183,9 @@
@@ -179,10 +181,9 @@
{
fprintf(stderr, "%s: error reading header\n", prefix);
@ -276,15 +276,15 @@ diff -Naur cracklib-2.9.7-orig/lib/packlib.c cracklib-2.9.7/lib/packlib.c
gzclose(dfp);
else
#endif
@@ -193,6 +194,7 @@
@@ -191,6 +192,7 @@
{
fclose(wfp);
}
+ free(pdesc);
+ free(pdesc);
return NULL;
}
if (pdesc64.header.pih_magic != PIH_MAGIC)
@@ -200,10 +202,9 @@
@@ -198,10 +200,9 @@
/* nope, not "64-bit" after all */
fprintf(stderr, "%s: error reading header\n", prefix);
@ -296,11 +296,11 @@ diff -Naur cracklib-2.9.7-orig/lib/packlib.c cracklib-2.9.7/lib/packlib.c
gzclose(dfp);
else
#endif
@@ -213,23 +214,23 @@
@@ -211,23 +212,23 @@
{
fclose(wfp);
}
+ free(pdesc);
+ free(pdesc);
return NULL;
}
- pdesc.header.pih_magic = pdesc64.header.pih_magic;
@ -327,7 +327,7 @@ diff -Naur cracklib-2.9.7-orig/lib/packlib.c cracklib-2.9.7/lib/packlib.c
gzclose(dfp);
else
#endif
@@ -239,17 +240,17 @@
@@ -237,17 +238,17 @@
{
fclose(wfp);
}
@ -348,7 +348,7 @@ diff -Naur cracklib-2.9.7-orig/lib/packlib.c cracklib-2.9.7/lib/packlib.c
gzclose(dfp);
else
#endif
@@ -258,17 +259,17 @@
@@ -256,17 +257,17 @@
{
fclose(wfp);
}
@ -369,7 +369,7 @@ diff -Naur cracklib-2.9.7-orig/lib/packlib.c cracklib-2.9.7/lib/packlib.c
gzclose(dfp);
else
#endif
@@ -277,10 +278,11 @@
@@ -275,10 +276,11 @@
{
fclose(wfp);
}
@ -382,7 +382,7 @@ diff -Naur cracklib-2.9.7-orig/lib/packlib.c cracklib-2.9.7/lib/packlib.c
{
int i;
@@ -288,27 +290,27 @@
@@ -286,27 +288,27 @@
{
if (fread(pdesc64.hwms, 1, sizeof(pdesc64.hwms), wfp) != sizeof(pdesc64.hwms))
{
@ -395,9 +395,8 @@ diff -Naur cracklib-2.9.7-orig/lib/packlib.c cracklib-2.9.7/lib/packlib.c
- pdesc.hwms[i] = pdesc64.hwms[i];
+ pdesc->hwms[i] = pdesc64.hwms[i];
}
- }
}
- else if (fread(pdesc.hwms, 1, sizeof(pdesc.hwms), wfp) != sizeof(pdesc.hwms))
+ }
+ else if (fread(pdesc->hwms, 1, sizeof(pdesc->hwms), wfp) != sizeof(pdesc->hwms))
{
- pdesc.flags &= ~PFOR_USEHWMS;
@ -418,15 +417,7 @@ diff -Naur cracklib-2.9.7-orig/lib/packlib.c cracklib-2.9.7/lib/packlib.c
}
int
@@ -318,6 +320,7 @@
if (pwp->header.pih_magic != PIH_MAGIC)
{
fprintf(stderr, "PWClose: close magic mismatch\n");
+ /* we do not try to free memory that is probably corrupted */
return (-1);
}
@@ -329,12 +332,14 @@
@@ -327,12 +329,14 @@
if (fseek(pwp->ifp, 0L, 0))
{
fprintf(stderr, "index magic fseek failed\n");
@ -437,11 +428,11 @@ diff -Naur cracklib-2.9.7-orig/lib/packlib.c cracklib-2.9.7/lib/packlib.c
if (!fwrite((char *) &pwp->header, sizeof(pwp->header), 1, pwp->ifp))
{
fprintf(stderr, "index magic fwrite failed\n");
+ free(pwp);
+ free(pwp);
return (-1);
}
@@ -368,6 +373,7 @@
@@ -366,6 +370,7 @@
}
pwp->header.pih_magic = 0;
@ -449,143 +440,143 @@ diff -Naur cracklib-2.9.7-orig/lib/packlib.c cracklib-2.9.7/lib/packlib.c
return (0);
}
diff -Naur cracklib-2.9.7-orig/lib/rules.c cracklib-2.9.7/lib/rules.c
--- cracklib-2.9.7-orig/lib/rules.c 2019-02-13 20:54:41.000000000 -0500
+++ cracklib-2.9.7/lib/rules.c 2022-03-07 15:11:48.271298263 -0500
@@ -82,12 +82,12 @@
diff -Naur cracklib-2.9.11-orig/lib/rules.c cracklib-2.9.11/lib/rules.c
--- cracklib-2.9.11-orig/lib/rules.c 2023-04-02 14:15:05.000000000 -0400
+++ cracklib-2.9.11/lib/rules.c 2023-07-07 18:58:04.892943574 -0400
@@ -80,12 +80,12 @@
}
char *
-Reverse(str) /* return a pointer to a reversal */
+Reverse(str, area) /* return a pointer to a reversal */
register char *str;
char *str;
+ char *area;
{
register int i;
register int j;
int i;
int j;
- static char area[STRINGSIZE];
j = i = strlen(str);
while (*str)
{
@@ -98,11 +98,11 @@
@@ -96,11 +96,11 @@
}
char *
-Uppercase(str) /* return a pointer to an uppercase */
+Uppercase(str, area) /* return a pointer to an uppercase */
register char *str;
char *str;
+ char *area;
{
register char *ptr;
char *ptr;
- static char area[STRINGSIZE];
ptr = area;
while (*str)
{
@@ -115,11 +115,11 @@
@@ -113,11 +113,11 @@
}
char *
-Lowercase(str) /* return a pointer to an lowercase */
+Lowercase(str, area) /* return a pointer to an lowercase */
register char *str;
char *str;
+ char *area;
{
register char *ptr;
char *ptr;
- static char area[STRINGSIZE];
ptr = area;
while (*str)
{
@@ -132,11 +132,11 @@
@@ -130,11 +130,11 @@
}
char *
-Capitalise(str) /* return a pointer to an capitalised */
+Capitalise(str, area) /* return a pointer to an capitalised */
register char *str;
char *str;
+ char *area;
{
register char *ptr;
char *ptr;
- static char area[STRINGSIZE];
ptr = area;
while (*str)
@@ -151,11 +151,11 @@
@@ -149,11 +149,11 @@
}
char *
-Pluralise(string) /* returns a pointer to a plural */
+Pluralise(string, area) /* returns a pointer to a plural */
register char *string;
char *string;
+ char *area;
{
register int length;
int length;
- static char area[STRINGSIZE];
length = strlen(string);
strcpy(area, string);
@@ -192,13 +192,13 @@
@@ -190,13 +190,13 @@
}
char *
-Substitute(string, old, new) /* returns pointer to a swapped about copy */
+Substitute(string, old, new, area) /* returns pointer to a swapped about copy */
register char *string;
register char old;
register char new;
char *string;
char old;
char new;
+ char *area;
{
register char *ptr;
char *ptr;
- static char area[STRINGSIZE];
ptr = area;
while (*string)
{
@@ -210,12 +210,12 @@
@@ -208,12 +208,12 @@
}
char *
-Purge(string, target) /* returns pointer to a purged copy */
+Purge(string, target, area) /* returns pointer to a purged copy */
register char *string;
register char target;
char *string;
char target;
+ char *area;
{
register char *ptr;
char *ptr;
- static char area[STRINGSIZE];
ptr = area;
while (*string)
{
@@ -372,13 +372,13 @@
@@ -370,13 +370,13 @@
}
char *
-PolySubst(string, class, new) /* returns pointer to a swapped about copy */
+PolySubst(string, class, new, area) /* returns pointer to a swapped about copy */
register char *string;
register char class;
register char new;
char *string;
char class;
char new;
+ char *area;
{
register char *ptr;
char *ptr;
- static char area[STRINGSIZE];
ptr = area;
while (*string)
{
@@ -390,12 +390,12 @@
@@ -388,12 +388,12 @@
}
char *
-PolyPurge(string, class) /* returns pointer to a purged copy */
+PolyPurge(string, class, area) /* returns pointer to a purged copy */
register char *string;
register char class;
char *string;
char class;
+ char *area;
{
register char *ptr;
char *ptr;
- static char area[STRINGSIZE];
ptr = area;
while (*string)
{
@@ -428,39 +428,40 @@
@@ -426,39 +426,40 @@
}
char *
@ -596,7 +587,7 @@ diff -Naur cracklib-2.9.7-orig/lib/rules.c cracklib-2.9.7/lib/rules.c
+ char *area;
{
int limit;
register char *ptr;
char *ptr;
- static char area[STRINGSIZE * 2] = {0};
char area2[STRINGSIZE * 2] = {0};
strcpy(area, input);
@ -634,7 +625,7 @@ diff -Naur cracklib-2.9.7-orig/lib/rules.c cracklib-2.9.7/lib/rules.c
break;
case RULE_DUPLICATE:
strcpy(area2, area);
@@ -547,7 +548,6 @@
@@ -545,7 +546,6 @@
Debug(1, "Mangle: extract: weird argument in '%s'\n", control);
return NULL;
}
@ -642,7 +633,7 @@ diff -Naur cracklib-2.9.7-orig/lib/rules.c cracklib-2.9.7/lib/rules.c
for (i = 0; length-- && area2[start + i]; i++)
{
area[i] = area2[start + i];
@@ -618,10 +618,10 @@
@@ -616,10 +616,10 @@
return NULL;
} else if (ptr[1] != RULE_CLASS)
{
@ -655,7 +646,7 @@ diff -Naur cracklib-2.9.7-orig/lib/rules.c cracklib-2.9.7/lib/rules.c
ptr += 2;
}
break;
@@ -632,11 +632,11 @@
@@ -630,11 +630,11 @@
return NULL;
} else if (ptr[1] != RULE_CLASS)
{

View File

@ -1,6 +1,6 @@
diff -Naur cracklib-2.9.7-orig/lib/fascist.c cracklib-2.9.7/lib/fascist.c
--- cracklib-2.9.7-orig/lib/fascist.c 2022-03-07 15:16:11.722225350 -0500
+++ cracklib-2.9.7/lib/fascist.c 2022-03-07 15:17:54.598692721 -0500
diff -Naur cracklib-2.9.11-orig/lib/fascist.c cracklib-2.9.11/lib/fascist.c
--- cracklib-2.9.11-orig/lib/fascist.c 2023-07-07 21:18:25.582821076 -0400
+++ cracklib-2.9.11/lib/fascist.c 2023-07-07 21:19:55.130234075 -0400
@@ -55,7 +55,6 @@
"/?p@?p", /* purging out punctuation/symbols/junk */
@ -15,8 +15,8 @@ diff -Naur cracklib-2.9.7-orig/lib/fascist.c cracklib-2.9.7/lib/fascist.c
+ if (len - strlen(mp) >= 3)
+ {
+ /* purged too much */
+ continue;
+ /* purged too much */
+ continue;
+ }
+
#ifdef DEBUG
@ -28,8 +28,8 @@ diff -Naur cracklib-2.9.7-orig/lib/fascist.c cracklib-2.9.7/lib/fascist.c
+ if (len - strlen(mp) >= 3)
+ {
+ /* purged too much */
+ continue;
+ /* purged too much */
+ continue;
+ }
+
#ifdef DEBUG
@ -60,7 +60,7 @@ diff -Naur cracklib-2.9.7-orig/lib/fascist.c cracklib-2.9.7/lib/fascist.c
- maxrepeat = 3+(0.09*strlen(password));
- if (i > maxrepeat)
+ /* We were still generating false positives for long passwords.
+ Just count systematic double as a single character. */
+ Just count systematic double as a single character. */
+ if (len - i < MINLEN)
{
return _("it is too simplistic/systematic");
@ -71,8 +71,8 @@ diff -Naur cracklib-2.9.7-orig/lib/fascist.c cracklib-2.9.7/lib/fascist.c
+ if (len - strlen(a) >= 3)
+ {
+ /* purged too much */
+ continue;
+ /* purged too much */
+ continue;
+ }
+
#ifdef DEBUG
@ -85,28 +85,27 @@ diff -Naur cracklib-2.9.7-orig/lib/fascist.c cracklib-2.9.7/lib/fascist.c
+
+ if (len - strlen(a) >= 3)
+ {
+ /* purged too much */
+ continue;
+ /* purged too much */
+ continue;
+ }
+
#ifdef DEBUG
printf("%-16s (reversed dict)\n", a);
#endif
diff -Naur cracklib-2.9.7-orig/util/cracklib-format cracklib-2.9.7/util/cracklib-format
--- cracklib-2.9.7-orig/util/cracklib-format 2019-02-13 20:54:41.000000000 -0500
+++ cracklib-2.9.7/util/cracklib-format 2022-03-07 15:17:54.599692726 -0500
@@ -3,8 +3,10 @@
# This preprocesses a set of word lists into a suitable form for input
# into cracklib-packer
diff -Naur cracklib-2.9.11-orig/util/cracklib-format cracklib-2.9.11/util/cracklib-format
--- cracklib-2.9.11-orig/util/cracklib-format 2021-01-22 10:58:14.000000000 -0500
+++ cracklib-2.9.11/util/cracklib-format 2023-07-07 21:19:14.854048317 -0400
@@ -10,10 +10,12 @@
# lines (possibly introduced by earlier parts of the pipeline) as
# cracklib-packer will generate "skipping line" warnings otherwise.
#
+LC_ALL=C
+export LC_ALL
gzip -cdf "$@" |
- grep -v '^\(#\|$\)' |
- tr '[A-Z]' '[a-z]' |
- tr -cd '\012[a-z][0-9]' |
grep -a -v '^#' |
tr '[A-Z]' '[a-z]' |
tr -cd '\012[a-z][0-9]' |
cut -c 1-1022 |
grep -v '^$' |
- env LC_ALL=C sort -u
+ grep -a -E -v '^.{32,}$' |
+ tr '[:upper:]' '[:lower:]' |
+ tr -cd '\n[:graph:]' |
+ sort -u

View File

@ -1,20 +0,0 @@
diff -up cracklib-2.9.6/lib/rules.c.coverity cracklib-2.9.6/lib/rules.c
--- cracklib-2.9.6/lib/rules.c.coverity 2018-10-09 12:15:31.455187555 +0200
+++ cracklib-2.9.6/lib/rules.c 2018-10-10 14:28:43.472740618 +0200
@@ -774,6 +774,8 @@ Mangle(input, control, area) /* returns
}
}
}
+ break;
+
case RULE_MLAST:
if (!ptr[1] || (ptr[1] == RULE_CLASS && !ptr[2]))
{
@@ -809,6 +811,7 @@ Mangle(input, control, area) /* returns
}
}
}
+ break;
default:
Debug(1, "Mangle: unknown command %c in %s\n", *ptr, control);

View File

@ -1,144 +0,0 @@
diff -up cracklib-2.9.6/lib/fascist.c.overflow cracklib-2.9.6/lib/fascist.c
--- cracklib-2.9.6/lib/fascist.c.overflow 2015-10-23 16:58:38.403319225 +0200
+++ cracklib-2.9.6/lib/fascist.c 2016-12-08 17:28:41.490101358 +0100
@@ -515,7 +515,7 @@ FascistGecosUser(char *password, const c
char gbuffer[STRINGSIZE];
char tbuffer[STRINGSIZE];
char *uwords[STRINGSIZE];
- char longbuffer[STRINGSIZE * 2];
+ char longbuffer[STRINGSIZE];
if (gecos == NULL)
gecos = "";
@@ -596,38 +596,47 @@ FascistGecosUser(char *password, const c
{
for (i = 0; i < j; i++)
{
- strcpy(longbuffer, uwords[i]);
- strcat(longbuffer, uwords[j]);
-
- if (GTry(longbuffer, password))
+ if (strlen(uwords[i]) + strlen(uwords[j]) < STRINGSIZE)
{
- return _("it is derived from your password entry");
- }
-
- strcpy(longbuffer, uwords[j]);
- strcat(longbuffer, uwords[i]);
+ strcpy(longbuffer, uwords[i]);
+ strcat(longbuffer, uwords[j]);
- if (GTry(longbuffer, password))
- {
- return _("it's derived from your password entry");
+ if (GTry(longbuffer, password))
+ {
+ return _("it is derived from your password entry");
+ }
+
+ strcpy(longbuffer, uwords[j]);
+ strcat(longbuffer, uwords[i]);
+
+ if (GTry(longbuffer, password))
+ {
+ return _("it's derived from your password entry");
+ }
}
- longbuffer[0] = uwords[i][0];
- longbuffer[1] = '\0';
- strcat(longbuffer, uwords[j]);
-
- if (GTry(longbuffer, password))
+ if (strlen(uwords[j]) < STRINGSIZE - 1)
{
- return _("it is derivable from your password entry");
+ longbuffer[0] = uwords[i][0];
+ longbuffer[1] = '\0';
+ strcat(longbuffer, uwords[j]);
+
+ if (GTry(longbuffer, password))
+ {
+ return _("it is derivable from your password entry");
+ }
}
- longbuffer[0] = uwords[j][0];
- longbuffer[1] = '\0';
- strcat(longbuffer, uwords[i]);
-
- if (GTry(longbuffer, password))
+ if (strlen(uwords[i]) < STRINGSIZE - 1)
{
- return _("it's derivable from your password entry");
+ longbuffer[0] = uwords[j][0];
+ longbuffer[1] = '\0';
+ strcat(longbuffer, uwords[i]);
+
+ if (GTry(longbuffer, password))
+ {
+ return _("it's derivable from your password entry");
+ }
}
}
}
diff -up cracklib-2.9.6/lib/rules.c.overflow cracklib-2.9.6/lib/rules.c
--- cracklib-2.9.6/lib/rules.c.overflow 2015-10-23 16:58:38.000000000 +0200
+++ cracklib-2.9.6/lib/rules.c 2016-12-08 18:03:27.041941297 +0100
@@ -158,6 +158,8 @@ Pluralise(string, area) /* returns a po
register int length;
length = strlen(string);
strcpy(area, string);
+ if (length > STRINGSIZE - 3) /* we add 2 characters at worst */
+ return (area);
if (!Suffix(string, "ch") ||
!Suffix(string, "ex") ||
@@ -462,11 +464,11 @@ Mangle(input, control, area) /* returns
Pluralise(area2, area);
break;
case RULE_REFLECT:
- strcat(area, Reverse(area, area2));
+ strncat(area, Reverse(area, area2), STRINGSIZE - strlen(area) - 1);
break;
case RULE_DUPLICATE:
strcpy(area2, area);
- strcat(area, area2);
+ strncat(area, area2, STRINGSIZE - strlen(area) - 1);
break;
case RULE_GT:
if (!ptr[1])
@@ -514,7 +516,8 @@ Mangle(input, control, area) /* returns
} else
{
area2[0] = *(++ptr);
- strcpy(area2 + 1, area);
+ strncpy(area2 + 1, area, STRINGSIZE - 2);
+ area2[STRINGSIZE - 1] = '\0';
strcpy(area, area2);
}
break;
@@ -528,8 +531,10 @@ Mangle(input, control, area) /* returns
register char *string;
string = area;
while (*(string++));
- string[-1] = *(++ptr);
- *string = '\0';
+ if (string < area + STRINGSIZE) {
+ string[-1] = *(++ptr);
+ *string = '\0';
+ }
}
break;
case RULE_EXTRACT:
@@ -600,6 +605,10 @@ Mangle(input, control, area) /* returns
}
p1 = area;
p2 = area2;
+ if (strlen(p1) > STRINGSIZE - 2) {
+ /* truncate */
+ p1[STRINGSIZE - 2] = '\0';
+ }
while (i && *p1)
{
i--;

View File

@ -1,60 +0,0 @@
diff -up cracklib-2.9.6/lib/packlib.c.lookup cracklib-2.9.6/lib/packlib.c
--- cracklib-2.9.6/lib/packlib.c.lookup 2018-10-10 14:19:06.988958835 +0200
+++ cracklib-2.9.6/lib/packlib.c 2018-11-26 16:04:34.648256614 +0100
@@ -585,12 +585,11 @@ fprintf(stderr, "look for (%s)\n", strin
fprintf(stderr, "---- %lu, %lu ----\n", lwm, hwm);
#endif
- middle = lwm + ((hwm - lwm + 1) / 2);
-
for (;;)
{
int cmp;
+ middle = lwm + ((hwm - lwm + 1) / 2);
#if DEBUG
fprintf(stderr, "lwm = %lu, middle = %lu, hwm = %lu\n", lwm, middle, hwm);
@@ -617,24 +616,28 @@ fprintf(stderr, "look for (%s)\n", strin
return(middle);
}
- if (middle == hwm)
- {
-#if DEBUG
- fprintf(stderr, "at terminal subdivision, stopping search\n");
-#endif
- break;
- }
-
if (cmp < 0)
{
- hwm = middle;
- middle = lwm + ((hwm - lwm ) / 2);
- }
+ if (middle == lwm)
+ {
+#if DEBUG
+ fprintf(stderr, "at terminal subdivision from right, stopping search\n");
+#endif
+ break;
+ }
+ hwm = middle - 1;
+ }
else if (cmp > 0)
{
- lwm = middle;
- middle = lwm + ((hwm - lwm + 1) / 2);
- }
+ if (middle == hwm)
+ {
+#if DEBUG
+ fprintf(stderr, "at terminal subdivision from left, stopping search\n");
+#endif
+ break;
+ }
+ lwm = middle + 1;
+ }
}
return (PW_WORDS(pwp));

View File

@ -1,672 +0,0 @@
diff -up cracklib-2.9.6/lib/fascist.c.reentrant cracklib-2.9.6/lib/fascist.c
--- cracklib-2.9.6/lib/fascist.c.reentrant 2015-08-18 20:41:16.000000000 +0200
+++ cracklib-2.9.6/lib/fascist.c 2015-10-22 18:17:20.338290974 +0200
@@ -36,8 +36,8 @@ typedef unsigned short uint16_t;
#undef DEBUG
#undef DEBUG2
-extern char *Reverse(char *buf);
-extern char *Lowercase(char *buf);
+extern char *Reverse(char *buf, char *area);
+extern char *Lowercase(char *buf, char *area);
static char *r_destructors[] = {
":", /* noop - must do this to test raw word. */
@@ -439,6 +439,8 @@ GTry(rawtext, password)
int i;
int len;
char *mp;
+ char area[STRINGSIZE];
+ char revarea[STRINGSIZE];
/* use destructors to turn password into rawtext */
/* note use of Reverse() to save duplicating all rules */
@@ -447,7 +449,7 @@ GTry(rawtext, password)
for (i = 0; r_destructors[i]; i++)
{
- if (!(mp = Mangle(password, r_destructors[i])))
+ if (!(mp = Mangle(password, r_destructors[i], area)))
{
continue;
}
@@ -462,10 +464,10 @@ GTry(rawtext, password)
}
#ifdef DEBUG
- printf("%-16s = %-16s (destruct %s reversed)\n", Reverse(mp), rawtext, r_destructors[i]);
+ printf("%-16s = %-16s (destruct %s reversed)\n", Reverse(mp, revarea), rawtext, r_destructors[i]);
#endif
- if (!strncmp(Reverse(mp), rawtext, len))
+ if (!strncmp(Reverse(mp, revarea), rawtext, len))
{
return (1);
}
@@ -473,7 +475,7 @@ GTry(rawtext, password)
for (i = 0; r_constructors[i]; i++)
{
- if (!(mp = Mangle(rawtext, r_constructors[i])))
+ if (!(mp = Mangle(rawtext, r_constructors[i], area)))
{
continue;
}
@@ -520,7 +522,7 @@ FascistGecosUser(char *password, const c
strncpy(tbuffer, gecos, STRINGSIZE);
tbuffer[STRINGSIZE-1] = '\0';
- strcpy(gbuffer, Lowercase(tbuffer));
+ Lowercase(tbuffer, gbuffer);
wc = 0;
ptr = gbuffer;
@@ -695,6 +697,7 @@ FascistLookUser(PWDICT *pwp, char *instr
char junk[STRINGSIZE];
char *password;
char rpassword[STRINGSIZE];
+ char area[STRINGSIZE];
uint32_t notfound;
notfound = PW_WORDS(pwp);
@@ -731,7 +734,7 @@ FascistLookUser(PWDICT *pwp, char *instr
return _("it does not contain enough DIFFERENT characters");
}
- strcpy(password, (char *)Lowercase(password));
+ strcpy(password, (char *)Lowercase(password, area));
Trim(password);
@@ -787,7 +790,7 @@ FascistLookUser(PWDICT *pwp, char *instr
{
char *a;
- if (!(a = Mangle(password, r_destructors[i])))
+ if (!(a = Mangle(password, r_destructors[i], area)))
{
continue;
}
@@ -802,13 +805,13 @@ FascistLookUser(PWDICT *pwp, char *instr
}
}
- strcpy(password, (char *)Reverse(password));
+ strcpy(password, (char *)Reverse(password, area));
for (i = 0; r_destructors[i]; i++)
{
char *a;
- if (!(a = Mangle(password, r_destructors[i])))
+ if (!(a = Mangle(password, r_destructors[i], area)))
{
continue;
}
diff -up cracklib-2.9.6/lib/packer.h.reentrant cracklib-2.9.6/lib/packer.h
--- cracklib-2.9.6/lib/packer.h.reentrant 2015-10-22 18:17:20.335290902 +0200
+++ cracklib-2.9.6/lib/packer.h 2015-10-22 18:17:20.338290974 +0200
@@ -82,7 +82,7 @@ extern int PWClose(PWDICT *pwp);
extern unsigned int FindPW(PWDICT *pwp, char *string);
extern int PutPW(PWDICT *pwp, char *string);
extern int PMatch(char *control, char *string);
-extern char *Mangle(char *input, char *control);
+extern char *Mangle(char *input, char *control, char *area);
extern char Chop(char *string);
extern char *Trim(char *string);
extern char *FascistLook(PWDICT *pwp, char *instring);
diff -up cracklib-2.9.6/lib/packlib.c.reentrant cracklib-2.9.6/lib/packlib.c
--- cracklib-2.9.6/lib/packlib.c.reentrant 2015-08-18 20:41:16.000000000 +0200
+++ cracklib-2.9.6/lib/packlib.c 2015-10-22 18:19:52.154911451 +0200
@@ -67,8 +67,8 @@ PWOpen(prefix, mode)
char *mode;
{
int use64 = 0;
- static PWDICT pdesc;
- static PWDICT64 pdesc64;
+ PWDICT *pdesc;
+ PWDICT64 pdesc64;
char iname[STRINGSIZE];
char dname[STRINGSIZE];
char wname[STRINGSIZE];
@@ -76,13 +76,11 @@ PWOpen(prefix, mode)
void *ifp;
void *wfp;
- if (pdesc.header.pih_magic == PIH_MAGIC)
- {
- fprintf(stderr, "%s: another dictionary already open\n", prefix);
+ pdesc = malloc(sizeof(*pdesc));
+ if (pdesc == NULL)
return NULL;
- }
- memset(&pdesc, '\0', sizeof(pdesc));
+ memset(pdesc, '\0', sizeof(*pdesc));
memset(&pdesc64, '\0', sizeof(pdesc64));
snprintf(iname, STRINGSIZE, "%s.pwi", prefix);
@@ -91,77 +89,80 @@ PWOpen(prefix, mode)
if (mode[0] == 'r')
{
- pdesc.flags &= ~PFOR_USEZLIB;
+ pdesc->flags &= ~PFOR_USEZLIB;
/* first try the normal db file */
- if (!(pdesc.dfp = fopen(dname, mode)))
+ if (!(pdesc->dfp = fopen(dname, mode)))
{
#ifdef HAVE_ZLIB_H
- pdesc.flags |= PFOR_USEZLIB;
+ pdesc->flags |= PFOR_USEZLIB;
/* try extension .gz */
snprintf(dname, STRINGSIZE, "%s.pwd.gz", prefix);
- if (!(pdesc.dfp = gzopen(dname, mode)))
+ if (!(pdesc->dfp = gzopen(dname, mode)))
{
perror(dname);
+ free(pdesc);
return NULL;
}
#else
perror(dname);
+ free(pdesc);
return NULL;
#endif
}
}
else
{
- pdesc.flags &= ~PFOR_USEZLIB;
+ pdesc->flags &= ~PFOR_USEZLIB;
/* write mode: use fopen */
- if (!(pdesc.dfp = fopen(dname, mode)))
+ if (!(pdesc->dfp = fopen(dname, mode)))
{
perror(dname);
+ free(pdesc);
return NULL;
}
}
- if (!(pdesc.ifp = fopen(iname, mode)))
+ if (!(pdesc->ifp = fopen(iname, mode)))
{
#ifdef HAVE_ZLIB_H
- if (pdesc.flags & PFOR_USEZLIB)
- gzclose(pdesc.dfp);
+ if(pdesc->flags & PFOR_USEZLIB)
+ gzclose(pdesc->dfp);
else
#endif
- fclose(pdesc.dfp);
+ fclose(pdesc->dfp);
perror(iname);
+ free(pdesc);
return NULL;
}
- if ((pdesc.wfp = fopen(wname, mode)))
+ if ((pdesc->wfp = fopen(wname, mode)))
{
- pdesc.flags |= PFOR_USEHWMS;
+ pdesc->flags |= PFOR_USEHWMS;
}
- ifp = pdesc.ifp;
- dfp = pdesc.dfp;
- wfp = pdesc.wfp;
+ ifp = pdesc->ifp;
+ dfp = pdesc->dfp;
+ wfp = pdesc->wfp;
if (mode[0] == 'w')
{
- pdesc.flags |= PFOR_WRITE;
- pdesc.header.pih_magic = PIH_MAGIC;
- pdesc.header.pih_blocklen = NUMWORDS;
- pdesc.header.pih_numwords = 0;
+ pdesc->flags |= PFOR_WRITE;
+ pdesc->header.pih_magic = PIH_MAGIC;
+ pdesc->header.pih_blocklen = NUMWORDS;
+ pdesc->header.pih_numwords = 0;
- fwrite((char *) &pdesc.header, sizeof(pdesc.header), 1, ifp);
+ fwrite((char *) &pdesc->header, sizeof(pdesc->header), 1, ifp);
} else
{
- pdesc.flags &= ~PFOR_WRITE;
+ pdesc->flags &= ~PFOR_WRITE;
- if (!fread((char *) &pdesc.header, sizeof(pdesc.header), 1, ifp))
+ if (!fread((char *) &pdesc->header, sizeof(pdesc->header), 1, ifp))
{
fprintf(stderr, "%s: error reading header\n", prefix);
- pdesc.header.pih_magic = 0;
fclose(ifp);
#ifdef HAVE_ZLIB_H
- if (pdesc.flags & PFOR_USEZLIB)
+ if(pdesc->flags & PFOR_USEZLIB)
gzclose(dfp);
else
#endif
@@ -170,10 +171,11 @@ PWOpen(prefix, mode)
{
fclose(wfp);
}
+ free(pdesc);
return NULL;
}
- if ((pdesc.header.pih_magic == 0) || (pdesc.header.pih_numwords == 0))
+ if ((pdesc->header.pih_magic == 0) || (pdesc->header.pih_numwords == 0))
{
/* uh-oh. either a broken "64-bit" file or a garbage file. */
rewind (ifp);
@@ -181,10 +183,9 @@ PWOpen(prefix, mode)
{
fprintf(stderr, "%s: error reading header\n", prefix);
- pdesc.header.pih_magic = 0;
fclose(ifp);
#ifdef HAVE_ZLIB_H
- if (pdesc.flags & PFOR_USEZLIB)
+ if (pdesc->flags & PFOR_USEZLIB)
gzclose(dfp);
else
#endif
@@ -193,6 +194,7 @@ PWOpen(prefix, mode)
{
fclose(wfp);
}
+ free(pdesc);
return NULL;
}
if (pdesc64.header.pih_magic != PIH_MAGIC)
@@ -200,10 +202,9 @@ PWOpen(prefix, mode)
/* nope, not "64-bit" after all */
fprintf(stderr, "%s: error reading header\n", prefix);
- pdesc.header.pih_magic = 0;
fclose(ifp);
#ifdef HAVE_ZLIB_H
- if (pdesc.flags & PFOR_USEZLIB)
+ if (pdesc->flags & PFOR_USEZLIB)
gzclose(dfp);
else
#endif
@@ -213,23 +214,23 @@ PWOpen(prefix, mode)
{
fclose(wfp);
}
+ free(pdesc);
return NULL;
}
- pdesc.header.pih_magic = pdesc64.header.pih_magic;
- pdesc.header.pih_numwords = pdesc64.header.pih_numwords;
- pdesc.header.pih_blocklen = pdesc64.header.pih_blocklen;
- pdesc.header.pih_pad = pdesc64.header.pih_pad;
+ pdesc->header.pih_magic = pdesc64.header.pih_magic;
+ pdesc->header.pih_numwords = pdesc64.header.pih_numwords;
+ pdesc->header.pih_blocklen = pdesc64.header.pih_blocklen;
+ pdesc->header.pih_pad = pdesc64.header.pih_pad;
use64 = 1;
}
- if (pdesc.header.pih_magic != PIH_MAGIC)
+ if (pdesc->header.pih_magic != PIH_MAGIC)
{
fprintf(stderr, "%s: magic mismatch\n", prefix);
- pdesc.header.pih_magic = 0;
fclose(ifp);
#ifdef HAVE_ZLIB_H
- if (pdesc.flags & PFOR_USEZLIB)
+ if (pdesc->flags & PFOR_USEZLIB)
gzclose(dfp);
else
#endif
@@ -239,17 +240,17 @@ PWOpen(prefix, mode)
{
fclose(wfp);
}
+ free(pdesc);
return NULL;
}
- if (pdesc.header.pih_numwords < 1)
+ if (pdesc->header.pih_numwords < 1)
{
fprintf(stderr, "%s: invalid word count\n", prefix);
- pdesc.header.pih_magic = 0;
fclose(ifp);
#ifdef HAVE_ZLIB_H
- if (pdesc.flags & PFOR_USEZLIB)
+ if (pdesc->flags & PFOR_USEZLIB)
gzclose(dfp);
else
#endif
@@ -258,17 +259,17 @@ PWOpen(prefix, mode)
{
fclose(wfp);
}
+ free(pdesc);
return NULL;
}
- if (pdesc.header.pih_blocklen != NUMWORDS)
+ if (pdesc->header.pih_blocklen != NUMWORDS)
{
fprintf(stderr, "%s: size mismatch\n", prefix);
- pdesc.header.pih_magic = 0;
fclose(ifp);
#ifdef HAVE_ZLIB_H
- if (pdesc.flags & PFOR_USEZLIB)
+ if (pdesc->flags & PFOR_USEZLIB)
gzclose(dfp);
else
#endif
@@ -277,10 +278,11 @@ PWOpen(prefix, mode)
{
fclose(wfp);
}
+ free(pdesc);
return NULL;
}
- if (pdesc.flags & PFOR_USEHWMS)
+ if (pdesc->flags & PFOR_USEHWMS)
{
int i;
@@ -288,27 +290,27 @@ PWOpen(prefix, mode)
{
if (fread(pdesc64.hwms, 1, sizeof(pdesc64.hwms), wfp) != sizeof(pdesc64.hwms))
{
- pdesc.flags &= ~PFOR_USEHWMS;
+ pdesc->flags &= ~PFOR_USEHWMS;
}
- for (i = 0; i < sizeof(pdesc.hwms) / sizeof(pdesc.hwms[0]); i++)
+ for (i = 0; i < sizeof(pdesc->hwms) / sizeof(pdesc->hwms[0]); i++)
{
- pdesc.hwms[i] = pdesc64.hwms[i];
+ pdesc->hwms[i] = pdesc64.hwms[i];
}
- }
- else if (fread(pdesc.hwms, 1, sizeof(pdesc.hwms), wfp) != sizeof(pdesc.hwms))
+ }
+ else if (fread(pdesc->hwms, 1, sizeof(pdesc->hwms), wfp) != sizeof(pdesc->hwms))
{
- pdesc.flags &= ~PFOR_USEHWMS;
+ pdesc->flags &= ~PFOR_USEHWMS;
}
#if DEBUG
for (i=1; i<=0xff; i++)
{
- printf("hwm[%02x] = %d\n", i, pdesc.hwms[i]);
+ printf("hwm[%02x] = %d\n", i, pdesc->hwms[i]);
}
#endif
}
}
- return (&pdesc);
+ return (pdesc);
}
int
@@ -318,6 +320,7 @@ PWClose(pwp)
if (pwp->header.pih_magic != PIH_MAGIC)
{
fprintf(stderr, "PWClose: close magic mismatch\n");
+ /* we do not try to free memory that is probably corrupted */
return (-1);
}
@@ -329,12 +332,14 @@ PWClose(pwp)
if (fseek(pwp->ifp, 0L, 0))
{
fprintf(stderr, "index magic fseek failed\n");
+ free(pwp);
return (-1);
}
if (!fwrite((char *) &pwp->header, sizeof(pwp->header), 1, pwp->ifp))
{
fprintf(stderr, "index magic fwrite failed\n");
+ free(pwp);
return (-1);
}
@@ -368,6 +373,7 @@ PWClose(pwp)
}
pwp->header.pih_magic = 0;
+ free(pwp);
return (0);
}
diff -up cracklib-2.9.6/lib/rules.c.reentrant cracklib-2.9.6/lib/rules.c
--- cracklib-2.9.6/lib/rules.c.reentrant 2015-08-18 20:41:16.000000000 +0200
+++ cracklib-2.9.6/lib/rules.c 2015-10-22 18:17:20.339290998 +0200
@@ -82,12 +82,12 @@ Suffix(myword, suffix)
}
char *
-Reverse(str) /* return a pointer to a reversal */
+Reverse(str, area) /* return a pointer to a reversal */
register char *str;
+ char *area;
{
register int i;
register int j;
- static char area[STRINGSIZE];
j = i = strlen(str);
while (*str)
{
@@ -98,11 +98,11 @@ Reverse(str) /* return a pointer to a
}
char *
-Uppercase(str) /* return a pointer to an uppercase */
+Uppercase(str, area) /* return a pointer to an uppercase */
register char *str;
+ char *area;
{
register char *ptr;
- static char area[STRINGSIZE];
ptr = area;
while (*str)
{
@@ -115,11 +115,11 @@ Uppercase(str) /* return a pointer to
}
char *
-Lowercase(str) /* return a pointer to an lowercase */
+Lowercase(str, area) /* return a pointer to an lowercase */
register char *str;
+ char *area;
{
register char *ptr;
- static char area[STRINGSIZE];
ptr = area;
while (*str)
{
@@ -132,11 +132,11 @@ Lowercase(str) /* return a pointer to
}
char *
-Capitalise(str) /* return a pointer to an capitalised */
+Capitalise(str, area) /* return a pointer to an capitalised */
register char *str;
+ char *area;
{
register char *ptr;
- static char area[STRINGSIZE];
ptr = area;
while (*str)
@@ -151,11 +151,11 @@ Capitalise(str) /* return a pointer to
}
char *
-Pluralise(string) /* returns a pointer to a plural */
+Pluralise(string, area) /* returns a pointer to a plural */
register char *string;
+ char *area;
{
register int length;
- static char area[STRINGSIZE];
length = strlen(string);
strcpy(area, string);
@@ -192,13 +192,13 @@ Pluralise(string) /* returns a pointer
}
char *
-Substitute(string, old, new) /* returns pointer to a swapped about copy */
+Substitute(string, old, new, area) /* returns pointer to a swapped about copy */
register char *string;
register char old;
register char new;
+ char *area;
{
register char *ptr;
- static char area[STRINGSIZE];
ptr = area;
while (*string)
{
@@ -210,12 +210,12 @@ Substitute(string, old, new) /* returns
}
char *
-Purge(string, target) /* returns pointer to a purged copy */
+Purge(string, target, area) /* returns pointer to a purged copy */
register char *string;
register char target;
+ char *area;
{
register char *ptr;
- static char area[STRINGSIZE];
ptr = area;
while (*string)
{
@@ -372,13 +372,13 @@ PolyStrchr(string, class)
}
char *
-PolySubst(string, class, new) /* returns pointer to a swapped about copy */
+PolySubst(string, class, new, area) /* returns pointer to a swapped about copy */
register char *string;
register char class;
register char new;
+ char *area;
{
register char *ptr;
- static char area[STRINGSIZE];
ptr = area;
while (*string)
{
@@ -390,12 +390,12 @@ PolySubst(string, class, new) /* returns
}
char *
-PolyPurge(string, class) /* returns pointer to a purged copy */
+PolyPurge(string, class, area) /* returns pointer to a purged copy */
register char *string;
register char class;
+ char *area;
{
register char *ptr;
- static char area[STRINGSIZE];
ptr = area;
while (*string)
{
@@ -428,40 +428,41 @@ Char2Int(character)
}
char *
-Mangle(input, control) /* returns a pointer to a controlled Mangle */
+Mangle(input, control, area) /* returns a pointer to a controlled Mangle */
char *input;
char *control;
+ char *area;
{
int limit;
register char *ptr;
- static char area[STRINGSIZE];
char area2[STRINGSIZE];
area[0] = '\0';
strcpy(area, input);
for (ptr = control; *ptr; ptr++)
{
+ strcpy(area2, area);
switch (*ptr)
{
case RULE_NOOP:
break;
case RULE_REVERSE:
- strcpy(area, Reverse(area));
+ Reverse(area2, area);
break;
case RULE_UPPERCASE:
- strcpy(area, Uppercase(area));
+ Uppercase(area2, area);
break;
case RULE_LOWERCASE:
- strcpy(area, Lowercase(area));
+ Lowercase(area2, area);
break;
case RULE_CAPITALISE:
- strcpy(area, Capitalise(area));
+ Capitalise(area2, area);
break;
case RULE_PLURALISE:
- strcpy(area, Pluralise(area));
+ Pluralise(area2, area);
break;
case RULE_REFLECT:
- strcat(area, Reverse(area));
+ strcat(area, Reverse(area, area2));
break;
case RULE_DUPLICATE:
strcpy(area2, area);
@@ -548,7 +549,6 @@ Mangle(input, control) /* returns a poi
Debug(1, "Mangle: extract: weird argument in '%s'\n", control);
return NULL;
}
- strcpy(area2, area);
for (i = 0; length-- && area2[start + i]; i++)
{
area[i] = area2[start + i];
@@ -619,10 +619,10 @@ Mangle(input, control) /* returns a poi
return NULL;
} else if (ptr[1] != RULE_CLASS)
{
- strcpy(area, Purge(area, *(++ptr)));
+ Purge(area2, *(++ptr), area);
} else
{
- strcpy(area, PolyPurge(area, ptr[2]));
+ PolyPurge(area2, ptr[2], area);
ptr += 2;
}
break;
@@ -633,11 +633,11 @@ Mangle(input, control) /* returns a poi
return NULL;
} else if (ptr[1] != RULE_CLASS)
{
- strcpy(area, Substitute(area, ptr[1], ptr[2]));
+ Substitute(area2, ptr[1], ptr[2], area);
ptr += 2;
} else
{
- strcpy(area, PolySubst(area, ptr[2], ptr[3]));
+ PolySubst(area2, ptr[2], ptr[3], area);
ptr += 3;
}
break;

View File

@ -1,112 +0,0 @@
diff -up cracklib-2.9.6/lib/fascist.c.simplistic cracklib-2.9.6/lib/fascist.c
--- cracklib-2.9.6/lib/fascist.c.simplistic 2015-10-22 18:21:51.099748012 +0200
+++ cracklib-2.9.6/lib/fascist.c 2015-10-22 18:21:51.101748060 +0200
@@ -55,7 +55,6 @@ static char *r_destructors[] = {
"/?p@?p", /* purging out punctuation/symbols/junk */
"/?s@?s",
- "/?X@?X",
/* attempt reverse engineering of password strings */
@@ -454,6 +453,12 @@ GTry(rawtext, password)
continue;
}
+ if (len - strlen(mp) >= 3)
+ {
+ /* purged too much */
+ continue;
+ }
+
#ifdef DEBUG
printf("%-16s = %-16s (destruct %s)\n", mp, rawtext, r_destructors[i]);
#endif
@@ -480,6 +485,12 @@ GTry(rawtext, password)
continue;
}
+ if (len - strlen(mp) >= 3)
+ {
+ /* purged too much */
+ continue;
+ }
+
#ifdef DEBUG
printf("%-16s = %-16s (construct %s)\n", mp, password, r_constructors[i]);
#endif
@@ -699,6 +710,7 @@ FascistLookUser(PWDICT *pwp, char *instr
char rpassword[STRINGSIZE];
char area[STRINGSIZE];
uint32_t notfound;
+ int len;
notfound = PW_WORDS(pwp);
/* already truncated if from FascistCheck() */
@@ -748,6 +760,7 @@ FascistLookUser(PWDICT *pwp, char *instr
return _("it is all whitespace");
}
+ len = strlen(password);
i = 0;
ptr = password;
while (ptr[0] && ptr[1])
@@ -759,10 +772,9 @@ FascistLookUser(PWDICT *pwp, char *instr
ptr++;
}
- /* Change by Ben Karsin from ITS at University of Hawaii at Manoa. Static MAXSTEP
- would generate many false positives for long passwords. */
- maxrepeat = 3+(0.09*strlen(password));
- if (i > maxrepeat)
+ /* We were still generating false positives for long passwords.
+ Just count systematic double as a single character. */
+ if (len - i < MINLEN)
{
return _("it is too simplistic/systematic");
}
@@ -795,6 +807,12 @@ FascistLookUser(PWDICT *pwp, char *instr
continue;
}
+ if (len - strlen(a) >= 3)
+ {
+ /* purged too much */
+ continue;
+ }
+
#ifdef DEBUG
printf("%-16s (dict)\n", a);
#endif
@@ -815,6 +833,13 @@ FascistLookUser(PWDICT *pwp, char *instr
{
continue;
}
+
+ if (len - strlen(a) >= 3)
+ {
+ /* purged too much */
+ continue;
+ }
+
#ifdef DEBUG
printf("%-16s (reversed dict)\n", a);
#endif
diff -up cracklib-2.9.6/util/cracklib-format.simplistic cracklib-2.9.6/util/cracklib-format
--- cracklib-2.9.6/util/cracklib-format.simplistic 2015-10-22 18:21:51.101748060 +0200
+++ cracklib-2.9.6/util/cracklib-format 2014-07-09 17:24:45.000000000 +0200
@@ -3,8 +3,10 @@
# This preprocesses a set of word lists into a suitable form for input
# into cracklib-packer
#
+LC_ALL=C
+export LC_ALL
gzip -cdf "$@" |
- grep -v '^\(#\|$\)' |
- tr '[A-Z]' '[a-z]' |
- tr -cd '\012[a-z][0-9]' |
- env LC_ALL=C sort -u
+ grep -a -E -v '^.{32,}$' |
+ tr '[:upper:]' '[:lower:]' |
+ tr -cd '\n[:graph:]' |
+ sort -u

File diff suppressed because it is too large Load Diff

View File

@ -1,118 +0,0 @@
diff -Naur cracklib-2.9.7-orig/po/as.po cracklib-2.9.7/po/as.po
--- cracklib-2.9.7-orig/po/as.po 2019-03-03 12:49:42.000000000 -0500
+++ cracklib-2.9.7/po/as.po 2022-03-07 15:22:59.631245123 -0500
@@ -76,7 +76,7 @@
#: lib/fascist.c:874
msgid "error loading dictionary"
-msgstr ""
+msgstr "শব্দকোষ ল'ড কৰোতে ত্ৰুটি"
#~ msgid "it's derived from your password entry"
#~ msgstr "ইয়াক আপোনাৰ গুপ্তশব্দৰ নিবেশৰ পৰা পোৱা হৈছে"
diff -Naur cracklib-2.9.7-orig/po/gu.po cracklib-2.9.7/po/gu.po
--- cracklib-2.9.7-orig/po/gu.po 2019-03-03 12:49:42.000000000 -0500
+++ cracklib-2.9.7/po/gu.po 2022-03-07 15:32:12.444115364 -0500
@@ -77,7 +77,7 @@
#: lib/fascist.c:874
msgid "error loading dictionary"
-msgstr ""
+msgstr "શબ્દકોષને લાવી રહ્યા હોય ત્યારે ભૂલ"
#~ msgid "it's derived from your password entry"
#~ msgstr "તમારા પાસવર્ડ પ્રવેશમાંથી તારવવામાં આવેલ છે"
diff -Naur cracklib-2.9.7-orig/po/hi.po cracklib-2.9.7/po/hi.po
--- cracklib-2.9.7-orig/po/hi.po 2019-03-03 12:49:42.000000000 -0500
+++ cracklib-2.9.7/po/hi.po 2022-03-07 15:33:31.445561126 -0500
@@ -78,7 +78,7 @@
#: lib/fascist.c:874
msgid "error loading dictionary"
-msgstr ""
+msgstr "शब्दकोश लोड करने में त्रुटि"
#~ msgid "it's derived from your password entry"
#~ msgstr "यह आपकी कूटशब्द प्रविष्टि से निकला हुआ है"
diff -Naur cracklib-2.9.7-orig/po/kn.po cracklib-2.9.7/po/kn.po
--- cracklib-2.9.7-orig/po/kn.po 2019-03-03 12:49:42.000000000 -0500
+++ cracklib-2.9.7/po/kn.po 2022-03-07 15:36:06.001428084 -0500
@@ -77,7 +77,7 @@
#: lib/fascist.c:874
msgid "error loading dictionary"
-msgstr ""
+msgstr "ಕೋಶವನ್ನು ಲೋಡ್ ಮಾಡುವಲ್ಲಿ ದೋಷ"
#~ msgid "it's derived from your password entry"
#~ msgstr "ಇದು ನಿಮ್ಮ ಗುಪ್ತಪದ ನಮೂದಿನಿಂದ ತೆಗೆದುಕೊಳ್ಳಲ್ಪಟ್ಟಿದೆ"
diff -Naur cracklib-2.9.7-orig/po/ml.po cracklib-2.9.7/po/ml.po
--- cracklib-2.9.7-orig/po/ml.po 2019-03-03 12:49:42.000000000 -0500
+++ cracklib-2.9.7/po/ml.po 2022-03-07 15:37:59.048062855 -0500
@@ -76,7 +76,7 @@
#: lib/fascist.c:874
msgid "error loading dictionary"
-msgstr ""
+msgstr "നിഘണ്ടു ലഭ്യമാക്കുന്നതില്<200d> പിശക്"
#~ msgid "it's derived from your password entry"
#~ msgstr "നിങ്ങളുടെ രഹസ്യവാക്കില്‍ നിന്നും ലഭ്യമാക്കുന്നു"
diff -Naur cracklib-2.9.7-orig/po/mr.po cracklib-2.9.7/po/mr.po
--- cracklib-2.9.7-orig/po/mr.po 2019-03-03 12:49:42.000000000 -0500
+++ cracklib-2.9.7/po/mr.po 2022-03-07 15:38:30.812241798 -0500
@@ -77,7 +77,7 @@
#: lib/fascist.c:874
msgid "error loading dictionary"
-msgstr ""
+msgstr "शब्दकोष लोड करतेवेळी त्रुटी"
#~ msgid "it's derived from your password entry"
#~ msgstr "तुमच्या पासवर्ड नोंद पासून प्राप्त"
diff -Naur cracklib-2.9.7-orig/po/or.po cracklib-2.9.7/po/or.po
--- cracklib-2.9.7-orig/po/or.po 2019-03-03 12:49:42.000000000 -0500
+++ cracklib-2.9.7/po/or.po 2022-03-07 15:39:56.858728487 -0500
@@ -77,7 +77,7 @@
#: lib/fascist.c:874
msgid "error loading dictionary"
-msgstr ""
+msgstr "ଅଭିଧାନ ଧାରଣ କରିବାରେ ତ୍ରୁଟି"
#~ msgid "it's derived from your password entry"
#~ msgstr "ଏହା ଆପଣଙ୍କର ପ୍ରବେଶ ସଂକେତ ଭରଣରୁ ଉତ୍ପନ୍ନ କରାହୋଇଥାଏ"
diff -Naur cracklib-2.9.7-orig/po/ta.po cracklib-2.9.7/po/ta.po
--- cracklib-2.9.7-orig/po/ta.po 2019-03-03 12:49:42.000000000 -0500
+++ cracklib-2.9.7/po/ta.po 2022-03-07 15:44:53.857740705 -0500
@@ -77,7 +77,7 @@
#: lib/fascist.c:874
msgid "error loading dictionary"
-msgstr ""
+msgstr "அகராதியை ஏற்றுவதில் பிழை"
#~ msgid "it's derived from your password entry"
#~ msgstr "இது உங்கள் கடவுச்சொல் உள்ளீடிலிருந்து வரையறுக்கப்பட்டது"
diff -Naur cracklib-2.9.7-orig/po/te.po cracklib-2.9.7/po/te.po
--- cracklib-2.9.7-orig/po/te.po 2019-03-03 12:49:42.000000000 -0500
+++ cracklib-2.9.7/po/te.po 2022-03-07 15:45:23.810936770 -0500
@@ -77,7 +77,7 @@
#: lib/fascist.c:874
msgid "error loading dictionary"
-msgstr ""
+msgstr "నిఘంటువును లోడు చేయుటలో దోషం"
#~ msgid "it's derived from your password entry"
#~ msgstr "ఇది మీ సంకేతపదము ప్రవేశమునుండి ఉత్పాదించబడింది"
diff -Naur cracklib-2.9.7-orig/po/zh_CN.po cracklib-2.9.7/po/zh_CN.po
--- cracklib-2.9.7-orig/po/zh_CN.po 2021-08-17 11:56:42.000000000 -0400
+++ cracklib-2.9.7/po/zh_CN.po 2022-03-07 15:48:56.407302640 -0500
@@ -76,3 +76,6 @@
msgid "it is based on a (reversed) dictionary word"
msgstr "它基于(颠倒的)字典单词"
+#: lib/fascist.c:865
+msgid "error loading dictionary"
+msgstr "加载字典错误"

View File

@ -4,30 +4,21 @@
Summary: A password-checking library
Name: cracklib
Version: 2.9.7
Release: 31%{?dist}
Version: 2.9.11
Release: 1%{?dist}
URL: https://github.com/cracklib/cracklib
License: LGPLv2+
Source0: https://github.com/cracklib/cracklib/releases/download/v%{version}/cracklib-%{version}.tar.gz
Source1: https://github.com/cracklib/cracklib/releases/download/v%{version}/cracklib-words-%{version}.gz
# For man pages.
Source2: http://archive.debian.org/debian/pool/main/c/cracklib2/cracklib2_2.9.2-1.debian.tar.xz
Source40: http://archive.debian.org/debian/pool/main/c/cracklib2/cracklib2_2.9.2-1.dsc
# From attachment to https://bugzilla.redhat.com/show_bug.cgi?id=627449
Source3: cracklib.default.zh_CN.po
Source2: cracklib.default.zh_CN.po
# No upstream source for this, just words missing from the current cracklib-words
Source10: missing-words.gz
Source3: missing-words.gz
Patch: cracklib-2.9.11-packlib-reentrant.patch
Patch: cracklib-2.9.11-simplistic.patch
Patch1: cracklib-2.9.1-inttypes.patch
Patch2: cracklib-2.9.0-python-gzdicts.patch
Patch4: cracklib-2.9.7-packlib-reentrant.patch
Patch6: cracklib-2.9.7-simplistic.patch
Patch7: cracklib-2.9.7-translation-updates.patch
Patch9: cracklib-2.9.6-coverity.patch
Patch10: cracklib-2.9.6-lookup.patch
BuildRequires: gcc
BuildRequires: words, gettext
BuildRequires: gettext-autopoint
@ -77,21 +68,13 @@ contains the utilities necessary for the creation of new dictionaries.
If you are installing CrackLib, you should also install cracklib-dicts.
%prep
%setup -q -a 2
%autosetup -p 1
# Replace zn_CN.po with one that wasn't mis-transcoded at some point.
install -p -m 644 %{SOURCE3} po/zh_CN.po
%patch1 -p1 -b .inttypes
%patch2 -p1 -b .gzdicts
%patch4 -p1 -b .reentrant
%patch6 -p1 -b .simplistic
%patch7 -p1 -b .translations
%patch9 -p1 -b .coverity
%patch10 -p1 -b .lookup
install -p -m 644 %{SOURCE2} po/zh_CN.po
mkdir cracklib-dicts
for dict in %{SOURCE10} %{SOURCE1}
for dict in %{SOURCE3} %{SOURCE1}
do
cp -fv ${dict} cracklib-dicts/
done
@ -109,44 +92,44 @@ make
%install
%make_install 'pythondir=${pyexecdir}'
./util/cracklib-format cracklib-dicts/* | \
./util/cracklib-packer $RPM_BUILD_ROOT%{dictpath}
./util/cracklib-format $RPM_BUILD_ROOT%{dictdir}/cracklib-small | \
./util/cracklib-packer $RPM_BUILD_ROOT%{dictdir}/cracklib-small
rm -f $RPM_BUILD_ROOT%{dictdir}/cracklib-small
sed s,/usr/lib/cracklib_dict,%{dictpath},g lib/crack.h > $RPM_BUILD_ROOT%{_includedir}/crack.h
ln -s cracklib-format $RPM_BUILD_ROOT%{_sbindir}/mkdict
./util/cracklib-packer %{buildroot}%{dictpath}
./util/cracklib-format %{buildroot}%{dictdir}/cracklib-small | \
./util/cracklib-packer %{buildroot}%{dictdir}/cracklib-small
rm -f %{buildroot}%{dictdir}/cracklib-small
sed s,/usr/lib/cracklib_dict,%{dictpath},g lib/crack.h > %{buildroot}%{_includedir}/crack.h
ln -s cracklib-format %{buildroot}%{_sbindir}/mkdict
# packer link removed as it clashes with hashicorp's packer binary.
#ln -s cracklib-packer $RPM_BUILD_ROOT/%{_sbindir}/packer
touch $RPM_BUILD_ROOT/top
#ln -s cracklib-packer %{buildroot}/%{_sbindir}/packer
touch %{buildroot}/top
toprelpath=..
touch $RPM_BUILD_ROOT/top
while ! test -f $RPM_BUILD_ROOT%{_libdir}/$toprelpath/top ; do
touch %{buildroot}/top
while ! test -f %{buildroot}%{_libdir}/$toprelpath/top ; do
toprelpath=../$toprelpath
done
rm -f $RPM_BUILD_ROOT/top
rm -f %{buildroot}/top
if test %{dictpath} != %{_libdir}/cracklib_dict ; then
ln -s $toprelpath%{dictpath}.hwm $RPM_BUILD_ROOT%{_libdir}/cracklib_dict.hwm
ln -s $toprelpath%{dictpath}.pwd $RPM_BUILD_ROOT%{_libdir}/cracklib_dict.pwd
ln -s $toprelpath%{dictpath}.pwi $RPM_BUILD_ROOT%{_libdir}/cracklib_dict.pwi
ln -s $toprelpath%{dictpath}.hwm %{buildroot}%{_libdir}/cracklib_dict.hwm
ln -s $toprelpath%{dictpath}.pwd %{buildroot}%{_libdir}/cracklib_dict.pwd
ln -s $toprelpath%{dictpath}.pwi %{buildroot}%{_libdir}/cracklib_dict.pwi
fi
rm -f $RPM_BUILD_ROOT%{_libdir}/python*/site-packages/_cracklib*.*a
rm -f $RPM_BUILD_ROOT%{_libdir}/libcrack.la
rm -f %{buildroot}%{_libdir}/python*/site-packages/_cracklib*.*a
rm -f %{buildroot}%{_libdir}/libcrack.la
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man{3,8}
install -p -m644 debian/*.3 $RPM_BUILD_ROOT%{_mandir}/man3/
install -p -m644 debian/*.8 $RPM_BUILD_ROOT%{_mandir}/man8/
if ! test -s $RPM_BUILD_ROOT%{_mandir}/man8/cracklib-packer.8 ; then
echo .so man8/cracklib-format.8 > $RPM_BUILD_ROOT%{_mandir}/man8/cracklib-packer.8
mkdir -p %{buildroot}%{_mandir}/man{3,8}
install -p -m644 doc/*.3 %{buildroot}%{_mandir}/man3/
install -p -m644 doc/*.8 %{buildroot}%{_mandir}/man8/
if ! test -s %{buildroot}%{_mandir}/man8/cracklib-packer.8 ; then
echo .so man8/cracklib-format.8 > %{buildroot}%{_mandir}/man8/cracklib-packer.8
fi
if ! test -s $RPM_BUILD_ROOT%{_mandir}/man8/cracklib-unpacker.8 ; then
echo .so man8/cracklib-format.8 > $RPM_BUILD_ROOT%{_mandir}/man8/cracklib-unpacker.8
if ! test -s %{buildroot}%{_mandir}/man8/cracklib-unpacker.8 ; then
echo .so man8/cracklib-format.8 > %{buildroot}%{_mandir}/man8/cracklib-unpacker.8
fi
%find_lang %{name}
%check
make test DESTDIR=$RPM_BUILD_ROOT
make test DESTDIR=%{buildroot}
%ldconfig_scriptlets
@ -171,6 +154,11 @@ make test DESTDIR=$RPM_BUILD_ROOT
%{_sbindir}/mkdict
%changelog
* Fri Jul 07 2023 Paul Wouters <paul.wouters@aiven.io - 2.9.11-1
- Resolves: rhbz#2123955 cracklib-2.9.11 is available
- Remove old patches, port remaining patches to 2.9.11
- Use man pages from doc/ instead of pulling them from debian
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.7-31
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild

View File

@ -1,5 +1,3 @@
SHA512 (cracklib-2.9.7.tar.gz) = 76d701ee521ae35b4cbab406f23a15c84937bb06d3c3747ca8ef2584a41074fc00309a676ec37ebd5b32930163213365cf508d47f614cfccea38e1ba6babb2ff
SHA512 (cracklib-words-2.9.7.gz) = 1fa34b0a2e16d6906982b248f1757bf5bf8154d8d7e8bab94a4ac25080c41434d3828a2c8dd5065e9be586f36480ab70375f09e0bb64eb495d96a460619e2bae
SHA512 (cracklib2_2.9.2-1.debian.tar.xz) = 3521f475389fdbb2ac79f745ea3c247dc179c7492e712a3f3f2620ff483c0c69a799b656d06f1e281012edfa33df53130a83a633381c6c1cd9f1d4eebf7ded8a
SHA512 (cracklib2_2.9.2-1.dsc) = e1b3bee4f015f0e3fcafa714429ae733b8377b2c4cdcfcc3b0cf77e922d78c2e57214f71ab4c8058650c8a80d5bdaf532648e038fdf37dce91045b9b9892023a
SHA512 (cracklib-2.9.11.tar.gz) = 9e73a715c8f82723abc36b08906e212aaf79a7f6dfa560c6a98963b1e63aa21f7b612f285a639a41ec9eec7025aa2c16f702aad934cd30bc995f470d62ee4bc3
SHA512 (cracklib-words-2.9.11.gz) = d1983e8e8fcb9abee4701581d66008eda2d7ad6ee8d017b7fed225b71bd333fa6199338f37fd120c1c6bf1c8a75025692f4118d97e8c384e578000bed59c6aed
SHA512 (missing-words.gz) = 50afb5538ddd15de997883f5ff6925d9084117851cfdcfc02f05c28304d6c17b46ea669fe626ad819e732b6f291f308194300c9db9b110a5c15a4e5d97ca6caa