Subject: BUG around fnmatch(), how to use it.

From: Kazushi (Jam) Marukawa <[email-masked]>
Date: Tue, 11 Jul 1995 21:16:09 +0900

Today, I sent a mail of BUG report for beta-4 like following.  And a new
beta-5 was released but such BUG was not fixed.  I will send a BUG report
for beta-5 to be taken notice of you.

   On Jul 11,  7:51, Kazushi (Jam) Marukawa wrote:
   > Subject: Re: New Beta ready
   > 
   > I guess that we need following patch about usage of fnmatch in access.c.

Currently, fnmatch's return value was changed 1 to 0, 0 means matching.
Thus almost all checking routines of the value were changed.  But two
routines ware left with old checking style.  I think we have to change it.

--- Kazushi

diff -au ./src/access.c.orig ./src/access.c
--- ./src/access.c.orig	Tue Jul 11 20:08:49 1995
+++ ./src/access.c	Tue Jul 11 21:14:53 1995
@@ -350,7 +350,7 @@
         if (!strcasecmp(ARG0, "yes"))
             l_compress = 1;
         for (which = 1; (which < MAXARGS) && ARG[which]; which++) {
-            if (fnmatch(ARG[which], class, NULL)) {
+            if (!fnmatch(ARG[which], class, NULL)) {
                 mangleopts |= l_compress * (O_COMPRESS | O_UNCOMPRESS);
                 set = 1;
             }
@@ -363,7 +363,7 @@
         if (!strcasecmp(ARG0, "yes"))
             l_tar = 1;
         for (which = 1; (which < MAXARGS) && ARG[which]; which++) {
-            if (fnmatch(ARG[which], class, NULL)) {
+            if (!fnmatch(ARG[which], class, NULL)) {
                 mangleopts |= l_tar * O_TAR;
                 set = 1;
             }