summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gmail.com>2013-06-02 01:53:38 +0000
committerMike Frysinger <vapier@gmail.com>2013-06-02 01:53:38 +0000
commit028325e282c17138ea50252b58eb4976b110c5f5 (patch)
tree7f2ddf96e79361cdc85d95a094efc1b0dd4f37ec
parentac029ecd4f2281187d38f90647358aa3c0a4cd19 (diff)
downloadcracklib-028325e282c17138ea50252b58eb4976b110c5f5.tar.gz
fix random whitespace damage
git-svn-id: file:///tmp/cracklib-svn/trunk@219 4175fe1e-86d5-4fdc-8e6a-506fab9d8533
-rw-r--r--cracklib/lib/fascist.c2
-rw-r--r--cracklib/lib/packlib.c54
-rw-r--r--cracklib/util/packer.c6
-rw-r--r--cracklib/util/testlib.c4
4 files changed, 32 insertions, 34 deletions
diff --git a/cracklib/lib/fascist.c b/cracklib/lib/fascist.c
index 2d53a9a..578ea84 100644
--- a/cracklib/lib/fascist.c
+++ b/cracklib/lib/fascist.c
@@ -756,7 +756,7 @@ FascistLookUser(PWDICT *pwp, char *instring,
ptr++;
}
- /* Change by Ben Karsin from ITS at University of Hawaii at Manoa. Static MAXSTEP
+ /* 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)
diff --git a/cracklib/lib/packlib.c b/cracklib/lib/packlib.c
index a6aab54..5ec5351 100644
--- a/cracklib/lib/packlib.c
+++ b/cracklib/lib/packlib.c
@@ -124,7 +124,7 @@ PWOpen(prefix, mode)
if (!(pdesc.ifp = fopen(iname, mode)))
{
#ifdef HAVE_ZLIB_H
- if(pdesc.flags & PFOR_USEZLIB)
+ if (pdesc.flags & PFOR_USEZLIB)
gzclose(pdesc.dfp);
else
#endif
@@ -161,12 +161,12 @@ PWOpen(prefix, mode)
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
fclose(dfp);
- if(wfp)
+ if (wfp)
{
fclose(wfp);
}
@@ -180,16 +180,16 @@ PWOpen(prefix, mode)
if (!fread((char *) &pdesc64.header, sizeof(pdesc64.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
fclose(dfp);
- if(wfp)
+ if (wfp)
{
fclose(wfp);
}
@@ -199,17 +199,17 @@ 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
fclose(dfp);
- if(wfp)
+ if (wfp)
{
fclose(wfp);
}
@@ -229,13 +229,13 @@ PWOpen(prefix, mode)
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
fclose(dfp);
- if(wfp)
+ if (wfp)
{
fclose(wfp);
}
@@ -245,16 +245,16 @@ PWOpen(prefix, mode)
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
fclose(dfp);
- if(wfp)
+ if (wfp)
{
fclose(wfp);
}
@@ -268,12 +268,12 @@ PWOpen(prefix, mode)
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
fclose(dfp);
- if(wfp)
+ if (wfp)
{
fclose(wfp);
}
@@ -294,7 +294,7 @@ PWOpen(prefix, mode)
{
pdesc.hwms[i] = pdesc64.hwms[i];
}
- }
+ }
else if (fread(pdesc.hwms, 1, sizeof(pdesc.hwms), wfp) != sizeof(pdesc.hwms))
{
pdesc.flags &= ~PFOR_USEHWMS;
@@ -357,12 +357,12 @@ PWClose(pwp)
fclose(pwp->ifp);
#ifdef HAVE_ZLIB_H
- if(pwp->flags & PFOR_USEZLIB)
+ if (pwp->flags & PFOR_USEZLIB)
gzclose(pwp->dfp);
else
#endif
fclose(pwp->dfp);
- if(pwp->wfp)
+ if (pwp->wfp)
{
fclose(pwp->wfp);
}
@@ -493,14 +493,14 @@ GetPW(pwp, number)
if (pwp->flags & PFOR_USEZLIB)
{
r = gzseek(pwp->dfp, datum, 0);
- if(r >= 0)
+ if (r >= 0)
r = 0;
}
else
#endif
r = fseek(pwp->dfp, datum, 0);
-
+
if (r)
{
perror("(data fseek failed)");
@@ -513,15 +513,13 @@ GetPW(pwp, number)
if (pwp->flags & PFOR_USEZLIB)
{
r = gzread(pwp->dfp, buffer, sizeof(buffer));
- if(r < 0)
+ if (r < 0)
r = 0;
}
else
#endif
r = fread(buffer, 1, sizeof(buffer), pwp->dfp);
-
-
-
+
if (!r)
{
perror("(data fread failed)");
@@ -625,7 +623,7 @@ fprintf(stderr, "look for (%s)\n", string);
if (middle == hwm)
{
-#if DEBUG
+#if DEBUG
fprintf(stderr, "at terminal subdivision, stopping search\n");
#endif
break;
@@ -634,11 +632,11 @@ fprintf(stderr, "look for (%s)\n", string);
if (cmp < 0)
{
hwm = middle;
- }
+ }
else if (cmp > 0)
{
lwm = middle;
- }
+ }
}
return (PW_WORDS(pwp));
diff --git a/cracklib/util/packer.c b/cracklib/util/packer.c
index cfb57a2..70075eb 100644
--- a/cracklib/util/packer.c
+++ b/cracklib/util/packer.c
@@ -1,7 +1,7 @@
/*
- * This program is copyright Alec Muffett 1993, portions copyright other authors.
+ * This program is copyright Alec Muffett 1993, portions copyright other authors.
* The authors disclaim all responsibility or liability with respect to it's usage
- * or its effect upon hardware or computer systems.
+ * or its effect upon hardware or computer systems.
*/
#include <stdio.h>
@@ -27,7 +27,7 @@ main(argc, argv)
{
file = DEFAULT_CRACKLIB_DICT;
}
- else
+ else
{
file = argv[1];
}
diff --git a/cracklib/util/testlib.c b/cracklib/util/testlib.c
index 4a2465d..0a57783 100644
--- a/cracklib/util/testlib.c
+++ b/cracklib/util/testlib.c
@@ -22,7 +22,7 @@ main ()
while (fgets (buffer, 1000, stdin))
{
const char *val;
-
+
Chop(buffer);
val = FascistCheck(buffer, NULL);
@@ -30,7 +30,7 @@ main ()
if (!val)
{
val = "ok";
- }
+ }
printf ("%s: %s\n", buffer, val);
}