Subject: ftpconversion woes

From: Marc Russell <[email-masked]>
Date: Fri, 14 Jul 1995 10:00:29 -0700 (PDT)

At one point in time, my ftpconversions were working just fine.  Now they 
aren't, and I can't determine why.  I've included the ftpconversions file 
below, as well as the area of the ftpaccess file that sets up the 
conversions.  Oh yeah.  Permissions on the ftpconversions file are 644, 
and the binaries that actually do the conversions are all in ~ftp/bin, 
and are set to read-execute. 

If anyone out there can see something I've done wrong, please let me know.

 :.Z:  :  :/bin/compress -d -c %s:T_REG|T_ASCII:O_UNCOMPRESS:UNCOMPRESS
 :   : :.Z:/bin/compress -c %s:T_REG|T_ASCII:O_COMPRESS:COMPRESS
 :.gz: :  :/bin/gzip -d -c %s:T_REG|T_ASCII:O_UNCOMPRESS:GUNZIP
 :   : :.gz:/bin/gzip -9 -c %s:T_REG|T_ASCII:O_COMPRESS:GZIP
 :   : :.tar:/bin/tar -c -f - %s:T_REG|T_DIR:O_TAR:TAR
 :   : :.tar.Z:/bin/tar -c -Z -f - %s:T_REG|T_DIR:O_COMPRESS|O_TAR:TAR+COMPRESS
 :   : :.tar.gz:/bin/tar -c -z -f - %s:T_REG|T_DIR:O_COMPRESS|O_TAR:TAR+GZIP
 :.zip: : :/bin/unzip %s:T_REG|T_ASCII|T_DIR:O_UNCOMPRESS:UNZIP
 :   : : .zip:/bin/zip -9 %s:T_REG|T_DIR|T_ASCII:O_COMPRESS:ZIP

ftpaccess:

uncompress      yes     anon    
uncompress      yes     agency
compress        yes     anon 
compress        yes     agency
tar     yes     anon         
tar     yes     agency

Thanks in advance!

marc
---------
[email-masked]		        
[email-masked] [Washington State Information Exchange (InfoX)]

---

From: Kazushi (Jam) Marukawa <[email-masked]>
Date: Sat, 15 Jul 1995 04:44:02 +0900

If you can recompile wu-ftpd to fix your problem, recompile it after
appling a patch in my last mail subjected "BUG around fnmatch(), how to use
it."  It will fix your problem because the wrong usage of fnmatch() is in a
checking routine for compress and tar command.  I add a same patch
following.

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;
             }

Or if you want to fix it without any compilation, you have to allow the
world to tar and/or compress with like following line in ftpaccess.  It
means that anyone who is (!anon || !agency) are allowed the compress and
tar.

compress        yes     anon agency
tar             yes     anon agency

--- Kazushi Marukawa