Subject: Solaris 2.6, path-filer, regex

From: Greg Mortensen <[email-masked]>
Date: Thu, 13 May 1999 10:31:42 -0400 (EDT)

Greetings.  Long story short:  I need to be able to write a
path-filter that matches spaces in uploaded filenames.  Unfortunately, it
doesn't appear that the Solaris regex engine supports this.  I've seen it
mentioned that the GNU library (regex 0.12?) does support this, however.
Has anyone managed to hack this together with Solaris and
wu-ftpd-2.4.2-vr17?

  Regards,
    Greg

\|/   ___   \|/        [email-masked]        +----- 2048/83C90191 -----+
 @~./'O o`\.~@                                   | 0B 65 E0 58 F3 F9 81 F5 |
/__( \___/ )__\  Crypto, Security, and Phrack:   | F0 72 75 FA 1E BD C9 66 |
   `\__`U_/'       http://world.std.com/~loki    +--- via Finger or WWW ---+

---

From: Gregory A Lundberg <[email-masked]>
Date: Thu, 13 May 1999 11:34:53 -0400 (EDT)

On Thu, 13 May 1999, Greg Mortensen wrote:

> path-filter that matches spaces in uploaded filenames.  
> Unfortunately, it doesn't appear that the Solaris regex engine
> supports this.  I've seen it mentioned that the GNU library (regex
> 0.12?) does support this, however. Has anyone managed to hack this
> together with Solaris and wu-ftpd-2.4.2-vr17?

I've heard it's been done.  Take a look at how Linux uses it.  Other than
that it should just about drop in but you might need to fiddle with order
of libraries in the Makefile (src/makefiles/Makefile.sol).

-- 

Gregory A Lundberg              Senior Partner, VRnet Company
1441 Elmdale Drive              [email-masked]
Kettering, OH 45409-1615 USA    1-800-809-2195

---

From: Greg Mortensen <[email-masked]>
Date: Thu, 13 May 1999 17:28:23 -0400 (EDT)

> of libraries in the Makefile (src/makefiles/Makefile.sol).

I've come up with the following patch, and it seems to work.  Apply it
from the src/ directory.  You need to have regex.c and regex.h (from the
GNU regex 0.12 package) in the src directory as well.

This patch could probably be done a lot more elegantly, but I had to get a
machine on-line.  :)  Comments or suggestions are welcome.

  Regards,
    Greg

---8<---Cut-here---8<---
*** config/config.sol.orig	Thu May 13 15:56:25 1999
--- config/config.sol	Thu May 13 15:27:17 1999
***************
*** 20,26 ****
  #undef  HAVE_UT_UT_HOST
  #define HAVE_VPRINTF
  #define L_INCR	SEEK_CUR
! #define REGEX
  #define SHADOW_PASSWORD
  #define SOLARIS_2
  #define SVR4
--- 20,28 ----
  #undef  HAVE_UT_UT_HOST
  #define HAVE_VPRINTF
  #define L_INCR	SEEK_CUR
! #undef  REGEX
! #define REGEXEC
! #define HAVE_GNU_REGEX_H
  #define SHADOW_PASSWORD
  #define SOLARIS_2
  #define SVR4
*** extensions.c.orig	Thu May 13 15:25:39 1999
--- extensions.c	Thu May 13 15:26:59 1999
***************
*** 85,90 ****
--- 85,94 ----
  #include <regex.h>
  #endif
  
+ #ifdef HAVE_GNU_REGEX_H
+ #include "regex.h"
+ #endif
+ 
  #if defined(REGEX) && defined(SVR4) && ! (defined(NO_LIBGEN))
  #include <libgen.h>
  #endif
*** makefiles/common.orig	Thu May 13 15:52:36 1999
--- makefiles/common	Thu May 13 15:50:56 1999
***************
*** 1,10 ****
  
  SRCS   = ftpd.c ftpcmd.c glob.c logwtmp.c popen.c vers.c access.c extensions.c \
           realpath.c acl.c private.c authenticate.c conversions.c hostacc.c \
!          sigfix.c routevector.c restrict.c
  OBJS   = ftpd.o ftpcmd.o glob.o logwtmp.o popen.o vers.o access.o extensions.o \
           realpath.o acl.o private.o authenticate.o conversions.o hostacc.o \
!          sigfix.o routevector.o restrict.o
  
  all: ftpd ftpcount ftpshut ckconfig
  
--- 1,10 ----
  
  SRCS   = ftpd.c ftpcmd.c glob.c logwtmp.c popen.c vers.c access.c extensions.c \
           realpath.c acl.c private.c authenticate.c conversions.c hostacc.c \
!          sigfix.c routevector.c restrict.c regex.c
  OBJS   = ftpd.o ftpcmd.o glob.o logwtmp.o popen.o vers.o access.o extensions.o \
           realpath.o acl.o private.o authenticate.o conversions.o hostacc.o \
!          sigfix.o routevector.o restrict.o regex.o
  
  all: ftpd ftpcount ftpshut ckconfig

---8<---Cut-here---8<---