Subject: Linux fix for spaces in filenames on upload

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

Well I have found an even easier way to fix the problem using spaces 
in filenames when uploading (Note: this is for Linux only, since I'm 
not sure if other O/Ses make use of the 're_syntax_options' variable)

I use the default re_comp()/re_exec() functions (which don't need any 
regfree()'s or anything, makes the code alot neater), with the minor 
addition of setting the 're_syntax_options' variable to a syntax that 
lets me use constructs like [:space:] inside a [...] list. 
I also define HAVE_REGEX_H in config.lnx, since re_syntax_options is
defined in regex.h, and since I suppose most Linux boxes have this file 
nowadays (?)

The patch is for version 2.4.2-beta-15 for the record.

First, make the path-filter lines in ftpaccess look something like this:

path-filter  anonymous  /etc/pathmsg  ^[-A-Za-z0-9_.[:space:]]*$  ^\.  ^-

Then, add the patch below and do a "build lnx/build install".

Good Luck,
Mats Petersson

----------------------------------------------------------------------------
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 23:08:56 1998
***************
*** 27,30 ****
--- 27,31 ----
  #define OVERWRITE
  #undef  REGEX
+ #define HAVE_REGEX_H
  #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 23:08:47 1998
***************
*** 882,885 ****
--- 882,889 ----
  #endif
  
+ #ifdef LINUX
+   re_syntax_options = RE_SYNTAX_POSIX_EXTENDED;
+ #endif
+ 
    while (getaclentry("path-filter", &entry) && ARG0 != NULL) {
        if (type_match(ARG0) && ARG1 && ARG2) {
----------------------------------------------------------------------------