Subject: Re: Spaces in filenames (fwd)

From: Mats Petersson <[email-masked]>
Date: Thu, 30 Apr 1998 20:39:53 +0200 (MET DST)

---------- Forwarded message ----------
Date: Thu, 30 Apr 1998 20:37:38 +0200 (MET DST)
From: Mats Petersson <[email-masked]>
To: Gregory A Lundberg <[email-masked]>
Subject: Re: Spaces in filenames

On Thu, 30 Apr 1998, Gregory A Lundberg wrote:

> On Thu, 30 Apr 1998, Mats Petersson wrote:
> 
> > I don't know why the Linux configuration isn't set up to use the POSIX
> > regcomp() and regexec() from the beginning, anyway this solved the problem 
> > with spaces in filenames on upload.
> 
> 'cause they used to be broken.
> 
> > If anyone using Linux is interested in a patch for v2.4.2-beta-15 I have 
> > it here.
> 
> Post it to the list so maybe others can generalize it.
> 

Ok here we go ;)

----------------------------------------------------------------------------

diff -x arpa -r -C 2 wu-ftpd-2.4.2-beta-15.old/src/config/config.lnx wu-ftpd-2.4.2-beta-15/src/config/config.lnx
*** wu-ftpd-2.4.2-beta-15.old/src/config/config.lnx	Fri Sep 12 05:09:40 1997
--- wu-ftpd-2.4.2-beta-15/src/config/config.lnx	Thu Apr 30 20:23:52 1998
***************
*** 27,30 ****
--- 27,32 ----
  #define OVERWRITE
  #undef  REGEX
+ #define HAVE_REGEX_H
+ #define REGEXEC
  #define SPT_TYPE SPT_REUSEARGV
  #undef  SHADOW_PASSWORD
diff -x arpa -r -C 2 wu-ftpd-2.4.2-beta-15.old/src/extensions.c wu-ftpd-2.4.2-beta-15/src/extensions.c
*** wu-ftpd-2.4.2-beta-15.old/src/extensions.c	Fri Sep 12 17:42:43 1997
--- wu-ftpd-2.4.2-beta-15/src/extensions.c	Thu Apr 30 20:23:41 1998
***************
*** 903,906 ****
--- 903,910 ----
                perror_reply(553, sp);
  #endif
+ 
+ #if defined(REGEXEC) && defined(LINUX)
+               regfree(&regexbuf);
+ #endif
                return(0);
            }
***************
*** 920,925 ****
--- 924,936 ----
                pr_mesg(553, ARG1);
                reply(553, "%s: Permission denied. (Filename (accept))", name);
+ #if defined(REGEXEC) && defined(LINUX)
+               regfree(&regexbuf);
+ #endif
                return(0);
            }
+ 
+ #if defined(REGEXEC) && defined(LINUX)
+           regfree(&regexbuf);
+ #endif
            /* is it in any of the disallowed regexps */
  
***************
*** 937,940 ****
--- 948,954 ----
                        perror_reply(553, sp);
  #endif
+ #if defined(REGEXEC) && defined(LINUX)
+                       regfree(&regexbuf);
+ #endif
                        return(0);
                    }
***************
*** 954,959 ****
--- 968,979 ----
                        pr_mesg(553, ARG1);
                        reply(553, "%s: Permission denied. (Filename (deny))", name);
+ #if defined(REGEXEC) && defined(LINUX)
+                       regfree(&regexbuf);
+ #endif
                        return(0);
                    }
+ #if defined(REGEXEC) && defined(LINUX)
+                   regfree(&regexbuf);
+ #endif
                }
            }

---------------------------------------------------------------------------