|
|
|
@ -1,7 +1,7 @@
|
|
|
|
|
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;
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
@ -12,7 +12,7 @@ diff -up cracklib-2.9.6/lib/fascist.c.reentrant cracklib-2.9.6/lib/fascist.c
|
|
|
|
|
|
|
|
|
|
static char *r_destructors[] = {
|
|
|
|
|
":", /* noop - must do this to test raw word. */
|
|
|
|
|
@@ -439,6 +439,8 @@ GTry(rawtext, password)
|
|
|
|
|
@@ -439,6 +439,8 @@
|
|
|
|
|
int i;
|
|
|
|
|
int len;
|
|
|
|
|
char *mp;
|
|
|
|
@ -21,7 +21,7 @@ diff -up cracklib-2.9.6/lib/fascist.c.reentrant cracklib-2.9.6/lib/fascist.c
|
|
|
|
|
|
|
|
|
|
/* use destructors to turn password into rawtext */
|
|
|
|
|
/* note use of Reverse() to save duplicating all rules */
|
|
|
|
|
@@ -447,7 +449,7 @@ GTry(rawtext, password)
|
|
|
|
|
@@ -447,7 +449,7 @@
|
|
|
|
|
|
|
|
|
|
for (i = 0; r_destructors[i]; i++)
|
|
|
|
|
{
|
|
|
|
@ -30,7 +30,7 @@ diff -up cracklib-2.9.6/lib/fascist.c.reentrant cracklib-2.9.6/lib/fascist.c
|
|
|
|
|
{
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
@@ -462,10 +464,10 @@ GTry(rawtext, password)
|
|
|
|
|
@@ -462,10 +464,10 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#ifdef DEBUG
|
|
|
|
@ -43,7 +43,7 @@ diff -up cracklib-2.9.6/lib/fascist.c.reentrant cracklib-2.9.6/lib/fascist.c
|
|
|
|
|
{
|
|
|
|
|
return (1);
|
|
|
|
|
}
|
|
|
|
|
@@ -473,7 +475,7 @@ GTry(rawtext, password)
|
|
|
|
|
@@ -473,7 +475,7 @@
|
|
|
|
|
|
|
|
|
|
for (i = 0; r_constructors[i]; i++)
|
|
|
|
|
{
|
|
|
|
@ -52,7 +52,7 @@ diff -up cracklib-2.9.6/lib/fascist.c.reentrant cracklib-2.9.6/lib/fascist.c
|
|
|
|
|
{
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
@@ -520,7 +522,7 @@ FascistGecosUser(char *password, const c
|
|
|
|
|
@@ -520,7 +522,7 @@
|
|
|
|
|
|
|
|
|
|
strncpy(tbuffer, gecos, STRINGSIZE);
|
|
|
|
|
tbuffer[STRINGSIZE-1] = '\0';
|
|
|
|
@ -61,7 +61,7 @@ diff -up cracklib-2.9.6/lib/fascist.c.reentrant cracklib-2.9.6/lib/fascist.c
|
|
|
|
|
|
|
|
|
|
wc = 0;
|
|
|
|
|
ptr = gbuffer;
|
|
|
|
|
@@ -695,6 +697,7 @@ FascistLookUser(PWDICT *pwp, char *instr
|
|
|
|
|
@@ -704,6 +706,7 @@
|
|
|
|
|
char junk[STRINGSIZE];
|
|
|
|
|
char *password;
|
|
|
|
|
char rpassword[STRINGSIZE];
|
|
|
|
@ -69,7 +69,7 @@ diff -up cracklib-2.9.6/lib/fascist.c.reentrant cracklib-2.9.6/lib/fascist.c
|
|
|
|
|
uint32_t notfound;
|
|
|
|
|
|
|
|
|
|
notfound = PW_WORDS(pwp);
|
|
|
|
|
@@ -731,7 +734,7 @@ FascistLookUser(PWDICT *pwp, char *instr
|
|
|
|
|
@@ -740,7 +743,7 @@
|
|
|
|
|
return _("it does not contain enough DIFFERENT characters");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -78,7 +78,7 @@ diff -up cracklib-2.9.6/lib/fascist.c.reentrant cracklib-2.9.6/lib/fascist.c
|
|
|
|
|
|
|
|
|
|
Trim(password);
|
|
|
|
|
|
|
|
|
|
@@ -787,7 +790,7 @@ FascistLookUser(PWDICT *pwp, char *instr
|
|
|
|
|
@@ -796,7 +799,7 @@
|
|
|
|
|
{
|
|
|
|
|
char *a;
|
|
|
|
|
|
|
|
|
@ -87,7 +87,7 @@ diff -up cracklib-2.9.6/lib/fascist.c.reentrant cracklib-2.9.6/lib/fascist.c
|
|
|
|
|
{
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
@@ -802,13 +805,13 @@ FascistLookUser(PWDICT *pwp, char *instr
|
|
|
|
|
@@ -811,13 +814,13 @@
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -103,10 +103,10 @@ diff -up cracklib-2.9.6/lib/fascist.c.reentrant cracklib-2.9.6/lib/fascist.c
|
|
|
|
|
{
|
|
|
|
|
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);
|
|
|
|
|
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);
|
|
|
|
|
extern int PMatch(char *control, char *string);
|
|
|
|
@ -115,10 +115,10 @@ diff -up cracklib-2.9.6/lib/packer.h.reentrant cracklib-2.9.6/lib/packer.h
|
|
|
|
|
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)
|
|
|
|
|
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 -up cracklib-2.9.6/lib/packlib.c.reentrant cracklib-2.9.6/lib/packlib.c
|
|
|
|
|
char iname[STRINGSIZE];
|
|
|
|
|
char dname[STRINGSIZE];
|
|
|
|
|
char wname[STRINGSIZE];
|
|
|
|
|
@@ -76,13 +76,11 @@ PWOpen(prefix, mode)
|
|
|
|
|
@@ -74,13 +74,11 @@
|
|
|
|
|
void *ifp;
|
|
|
|
|
void *wfp;
|
|
|
|
|
|
|
|
|
@ -146,7 +146,7 @@ diff -up cracklib-2.9.6/lib/packlib.c.reentrant cracklib-2.9.6/lib/packlib.c
|
|
|
|
|
memset(&pdesc64, '\0', sizeof(pdesc64));
|
|
|
|
|
|
|
|
|
|
snprintf(iname, STRINGSIZE, "%s.pwi", prefix);
|
|
|
|
|
@@ -91,77 +89,80 @@ PWOpen(prefix, mode)
|
|
|
|
|
@@ -89,77 +87,80 @@
|
|
|
|
|
|
|
|
|
|
if (mode[0] == 'r')
|
|
|
|
|
{
|
|
|
|
@ -195,7 +195,7 @@ diff -up cracklib-2.9.6/lib/packlib.c.reentrant cracklib-2.9.6/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 -up cracklib-2.9.6/lib/packlib.c.reentrant cracklib-2.9.6/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 @@ PWOpen(prefix, mode)
|
|
|
|
|
@@ -168,10 +169,11 @@
|
|
|
|
|
{
|
|
|
|
|
fclose(wfp);
|
|
|
|
|
}
|
|
|
|
@ -264,7 +264,7 @@ diff -up cracklib-2.9.6/lib/packlib.c.reentrant cracklib-2.9.6/lib/packlib.c
|
|
|
|
|
{
|
|
|
|
|
/* uh-oh. either a broken "64-bit" file or a garbage file. */
|
|
|
|
|
rewind (ifp);
|
|
|
|
|
@@ -181,10 +183,9 @@ PWOpen(prefix, mode)
|
|
|
|
|
@@ -179,10 +181,9 @@
|
|
|
|
|
{
|
|
|
|
|
fprintf(stderr, "%s: error reading header\n", prefix);
|
|
|
|
|
|
|
|
|
@ -276,15 +276,15 @@ diff -up cracklib-2.9.6/lib/packlib.c.reentrant cracklib-2.9.6/lib/packlib.c
|
|
|
|
|
gzclose(dfp);
|
|
|
|
|
else
|
|
|
|
|
#endif
|
|
|
|
|
@@ -193,6 +194,7 @@ PWOpen(prefix, mode)
|
|
|
|
|
@@ -191,6 +192,7 @@
|
|
|
|
|
{
|
|
|
|
|
fclose(wfp);
|
|
|
|
|
}
|
|
|
|
|
+ free(pdesc);
|
|
|
|
|
+ free(pdesc);
|
|
|
|
|
return NULL;
|
|
|
|
|
}
|
|
|
|
|
if (pdesc64.header.pih_magic != PIH_MAGIC)
|
|
|
|
|
@@ -200,10 +202,9 @@ PWOpen(prefix, mode)
|
|
|
|
|
@@ -198,10 +200,9 @@
|
|
|
|
|
/* nope, not "64-bit" after all */
|
|
|
|
|
fprintf(stderr, "%s: error reading header\n", prefix);
|
|
|
|
|
|
|
|
|
@ -296,11 +296,11 @@ diff -up cracklib-2.9.6/lib/packlib.c.reentrant cracklib-2.9.6/lib/packlib.c
|
|
|
|
|
gzclose(dfp);
|
|
|
|
|
else
|
|
|
|
|
#endif
|
|
|
|
|
@@ -213,23 +214,23 @@ PWOpen(prefix, mode)
|
|
|
|
|
@@ -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 -up cracklib-2.9.6/lib/packlib.c.reentrant cracklib-2.9.6/lib/packlib.c
|
|
|
|
|
gzclose(dfp);
|
|
|
|
|
else
|
|
|
|
|
#endif
|
|
|
|
|
@@ -239,17 +240,17 @@ PWOpen(prefix, mode)
|
|
|
|
|
@@ -237,17 +238,17 @@
|
|
|
|
|
{
|
|
|
|
|
fclose(wfp);
|
|
|
|
|
}
|
|
|
|
@ -348,7 +348,7 @@ diff -up cracklib-2.9.6/lib/packlib.c.reentrant cracklib-2.9.6/lib/packlib.c
|
|
|
|
|
gzclose(dfp);
|
|
|
|
|
else
|
|
|
|
|
#endif
|
|
|
|
|
@@ -258,17 +259,17 @@ PWOpen(prefix, mode)
|
|
|
|
|
@@ -256,17 +257,17 @@
|
|
|
|
|
{
|
|
|
|
|
fclose(wfp);
|
|
|
|
|
}
|
|
|
|
@ -369,7 +369,7 @@ diff -up cracklib-2.9.6/lib/packlib.c.reentrant cracklib-2.9.6/lib/packlib.c
|
|
|
|
|
gzclose(dfp);
|
|
|
|
|
else
|
|
|
|
|
#endif
|
|
|
|
|
@@ -277,10 +278,11 @@ PWOpen(prefix, mode)
|
|
|
|
|
@@ -275,10 +276,11 @@
|
|
|
|
|
{
|
|
|
|
|
fclose(wfp);
|
|
|
|
|
}
|
|
|
|
@ -382,7 +382,7 @@ diff -up cracklib-2.9.6/lib/packlib.c.reentrant cracklib-2.9.6/lib/packlib.c
|
|
|
|
|
{
|
|
|
|
|
int i;
|
|
|
|
|
|
|
|
|
|
@@ -288,27 +290,27 @@ PWOpen(prefix, mode)
|
|
|
|
|
@@ -286,27 +288,27 @@
|
|
|
|
|
{
|
|
|
|
|
if (fread(pdesc64.hwms, 1, sizeof(pdesc64.hwms), wfp) != sizeof(pdesc64.hwms))
|
|
|
|
|
{
|
|
|
|
@ -395,9 +395,8 @@ diff -up cracklib-2.9.6/lib/packlib.c.reentrant cracklib-2.9.6/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 -up cracklib-2.9.6/lib/packlib.c.reentrant cracklib-2.9.6/lib/packlib.c
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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)
|
|
|
|
|
@@ -327,12 +329,14 @@
|
|
|
|
|
if (fseek(pwp->ifp, 0L, 0))
|
|
|
|
|
{
|
|
|
|
|
fprintf(stderr, "index magic fseek failed\n");
|
|
|
|
@ -437,11 +428,11 @@ diff -up cracklib-2.9.6/lib/packlib.c.reentrant cracklib-2.9.6/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 @@ PWClose(pwp)
|
|
|
|
|
@@ -366,6 +370,7 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
pwp->header.pih_magic = 0;
|
|
|
|
@ -449,143 +440,143 @@ diff -up cracklib-2.9.6/lib/packlib.c.reentrant cracklib-2.9.6/lib/packlib.c
|
|
|
|
|
|
|
|
|
|
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)
|
|
|
|
|
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 @@ Reverse(str) /* return a pointer to a
|
|
|
|
|
@@ -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 @@ Uppercase(str) /* return a pointer to
|
|
|
|
|
@@ -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 @@ Lowercase(str) /* return a pointer to
|
|
|
|
|
@@ -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 @@ Capitalise(str) /* return a pointer to
|
|
|
|
|
@@ -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 @@ Pluralise(string) /* returns a pointer
|
|
|
|
|
@@ -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 @@ Substitute(string, old, new) /* returns
|
|
|
|
|
@@ -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 @@ PolyStrchr(string, class)
|
|
|
|
|
@@ -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 @@ PolySubst(string, class, new) /* returns
|
|
|
|
|
@@ -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,40 +428,41 @@ Char2Int(character)
|
|
|
|
|
@@ -426,39 +426,40 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
char *
|
|
|
|
@ -596,10 +587,9 @@ diff -up cracklib-2.9.6/lib/rules.c.reentrant cracklib-2.9.6/lib/rules.c
|
|
|
|
|
+ char *area;
|
|
|
|
|
{
|
|
|
|
|
int limit;
|
|
|
|
|
register char *ptr;
|
|
|
|
|
- static char area[STRINGSIZE];
|
|
|
|
|
char area2[STRINGSIZE];
|
|
|
|
|
area[0] = '\0';
|
|
|
|
|
char *ptr;
|
|
|
|
|
- static char area[STRINGSIZE * 2] = {0};
|
|
|
|
|
char area2[STRINGSIZE * 2] = {0};
|
|
|
|
|
strcpy(area, input);
|
|
|
|
|
|
|
|
|
|
for (ptr = control; *ptr; ptr++)
|
|
|
|
@ -635,7 +625,7 @@ diff -up cracklib-2.9.6/lib/rules.c.reentrant cracklib-2.9.6/lib/rules.c
|
|
|
|
|
break;
|
|
|
|
|
case RULE_DUPLICATE:
|
|
|
|
|
strcpy(area2, area);
|
|
|
|
|
@@ -548,7 +549,6 @@ Mangle(input, control) /* returns a poi
|
|
|
|
|
@@ -545,7 +546,6 @@
|
|
|
|
|
Debug(1, "Mangle: extract: weird argument in '%s'\n", control);
|
|
|
|
|
return NULL;
|
|
|
|
|
}
|
|
|
|
@ -643,7 +633,7 @@ diff -up cracklib-2.9.6/lib/rules.c.reentrant cracklib-2.9.6/lib/rules.c
|
|
|
|
|
for (i = 0; length-- && area2[start + i]; i++)
|
|
|
|
|
{
|
|
|
|
|
area[i] = area2[start + i];
|
|
|
|
|
@@ -619,10 +619,10 @@ Mangle(input, control) /* returns a poi
|
|
|
|
|
@@ -616,10 +616,10 @@
|
|
|
|
|
return NULL;
|
|
|
|
|
} else if (ptr[1] != RULE_CLASS)
|
|
|
|
|
{
|
|
|
|
@ -656,7 +646,7 @@ diff -up cracklib-2.9.6/lib/rules.c.reentrant cracklib-2.9.6/lib/rules.c
|
|
|
|
|
ptr += 2;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
@@ -633,11 +633,11 @@ Mangle(input, control) /* returns a poi
|
|
|
|
|
@@ -630,11 +630,11 @@
|
|
|
|
|
return NULL;
|
|
|
|
|
} else if (ptr[1] != RULE_CLASS)
|
|
|
|
|
{
|