Mailing List Archive

cvs commit: apache-1.3/src/main http_main.c
rse 98/04/27 01:17:30

Modified: . STATUS
src CHANGES Configuration.tmpl Configure
src/main http_main.c
Log:
Fix SOCKS4 support (missing SOCKSinit, non-portable grep in Configure and
wrong if-statement for Solaris) and add additional SOCKS5 support.

PR: 2140

Revision Changes Path
1.333 +1 -0 apache-1.3/STATUS

Index: STATUS
===================================================================
RCS file: /export/home/cvs/apache-1.3/STATUS,v
retrieving revision 1.332
retrieving revision 1.333
diff -u -r1.332 -r1.333
--- STATUS 1998/04/27 06:59:29 1.332
+++ STATUS 1998/04/27 08:17:22 1.333
@@ -68,6 +68,7 @@
* Ralf's various bugfixes and cleanups for the configure script
* Ralf's workaround for braindead awk when generating ap_config.h, PR#2139
* Ralf's manual renaming of forgotten non-ap_-symbols because of #define
+ * Ralf's fix for SOCKS4 and adding of additional SOCKS5 support, PR#2140

Available Patches:




1.796 +3 -0 apache-1.3/src/CHANGES

Index: CHANGES
===================================================================
RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v
retrieving revision 1.795
retrieving revision 1.796
diff -u -r1.795 -r1.796
--- CHANGES 1998/04/27 06:59:30 1.795
+++ CHANGES 1998/04/27 08:17:24 1.796
@@ -1,5 +1,8 @@
Changes with Apache 1.3b7

+ *) Adding SOCKS5 support and fixing existing SOCKS4 support.
+ [Ralf S. Engelschall] PR#2140
+
*) Manually fix some symbols which were not renamed to prefix ap_ in the BIG
RENAMING process because they are defined as pre-processor macros instead
of real functions: bputc, bgetc, piped_log_write_fd, piped_log_read_fd



1.101 +8 -2 apache-1.3/src/Configuration.tmpl

Index: Configuration.tmpl
===================================================================
RCS file: /export/home/cvs/apache-1.3/src/Configuration.tmpl,v
retrieving revision 1.100
retrieving revision 1.101
diff -u -r1.100 -r1.101
--- Configuration.tmpl 1998/04/14 08:27:33 1.100
+++ Configuration.tmpl 1998/04/27 08:17:25 1.101
@@ -92,7 +92,7 @@
# functions. The format is: Rule RULE=value
#
# At present, only the following RULES are known: WANTHSREGEX, SOCKS4,
-# STATUS, IRIXNIS, IRIXN32 and PARANOID.
+# SOCKS5, STATUS, IRIXNIS, IRIXN32 and PARANOID.
#
# For all Rules, if set to "yes", then Configure knows we want that
# capability and does what is required to add it in. If set to "default"
@@ -100,10 +100,15 @@
# present, then nothing is done.
#
# SOCKS4:
-# If SOCKS4 is set to 'yes', be sure that you add the sock library
+# If SOCKS4 is set to 'yes', be sure that you add the socks library
# location to EXTRA_LIBS, otherwise Configure will assume
# "-L/usr/local/lib -lsocks"
#
+# SOCKS5:
+# If SOCKS5 is set to 'yes', be sure that you add the socks5 library
+# location to EXTRA_LIBS, otherwise Configure will assume
+# "-L/usr/local/lib -lsocks5"
+#
# STATUS:
# If Configure determines that you are using the status_module,
# it will automatically enable full status information if set
@@ -132,6 +137,7 @@

Rule STATUS=yes
Rule SOCKS4=no
+Rule SOCKS5=no
Rule IRIXNIS=no
Rule IRIXN32=yes
Rule PARANOID=no



1.247 +31 -9 apache-1.3/src/Configure

Index: Configure
===================================================================
RCS file: /export/home/cvs/apache-1.3/src/Configure,v
retrieving revision 1.246
retrieving revision 1.247
diff -u -r1.246 -r1.247
--- Configure 1998/04/26 18:29:29 1.246
+++ Configure 1998/04/27 08:17:26 1.247
@@ -232,6 +232,7 @@
RULE_WANTHSREGEX=`./helpers/CutRule WANTHSREGEX $file`
RULE_STATUS=`./helpers/CutRule STATUS $file`
RULE_SOCKS4=`./helpers/CutRule SOCKS4 $file`
+RULE_SOCKS5=`./helpers/CutRule SOCKS5 $file`
RULE_IRIXNIS=`./helpers/CutRule IRIXNIS $file`
RULE_IRIXN32=`./helpers/CutRule IRIXN32 $file`
RULE_PARANOID=`./helpers/CutRule PARANOID $file`
@@ -1065,21 +1066,42 @@
;;
esac

-# Now SOCKS4.
-# NOTE: We assume that if they are using SOCKS4, then they've
-# adjusted EXTRA_LIBS and/or EXTRA_LDFLAGS as required,
-# otherwise we assume "-L/usr/local/lib -lsocks"
+# SOCKS4 support:
+# We assume that if they are using SOCKS4, then they've
+# adjusted EXTRA_LIBS and/or EXTRA_LDFLAGS as required,
+# otherwise we assume "-L/usr/local/lib -lsocks"
if [ "$RULE_SOCKS4" = "yes" ]; then
- # Set flag and check Makefile for -lsocks line
+ echo " + enabling SOCKS4 support"
+ CFLAGS="$CFLAGS -DSOCKS -DSOCKS4"
CFLAGS="$CFLAGS -Dconnect=Rconnect -Dselect=Rselect"
CFLAGS="$CFLAGS -Dgethostbyname=Rgethostbyname"
- if grep "EXTRA_" Makefile | grep "\-lsocks" > /dev/null; then : ;
- else
+ if [ ".`grep EXTRA_ Makefile | grep lsocks`" = . ]; then
LIBS="$LIBS -L/usr/local/lib -lsocks"
fi
- if [ "$OS" = "Solaris 2" ]; then
- LIBS="$LIBS -lresolv"
+ case $PLAT in
+ *-solaris2* )
+ LIBS="$LIBS -lresolv"
+ ;;
+ esac
+fi
+
+# SOCKS5 support:
+# We assume that if they are using SOCKS5, then they've
+# adjusted EXTRA_LIBS and/or EXTRA_LDFLAGS as required,
+# otherwise we assume "-L/usr/local/lib -lsocks5"
+if [ "$RULE_SOCKS5" = "yes" ]; then
+ echo " + enabling SOCKS5 support"
+ CFLAGS="$CFLAGS -DSOCKS -DSOCKS5"
+ CFLAGS="$CFLAGS -Dconnect=SOCKSconnect -Dselect=SOCKSselect"
+ CFLAGS="$CFLAGS -Dgethostbyname=SOCKSgethostbyname -Dclose=SOCKSclose"
+ if [ ".`grep EXTRA_ Makefile | grep lsocks5`" = . ]; then
+ LIBS="$LIBS -L/usr/local/lib -lsocks5"
fi
+ case $PLAT in
+ *-solaris2* )
+ LIBS="$LIBS -lresolv"
+ ;;
+ esac
fi

####################################################################



1.326 +4 -0 apache-1.3/src/main/http_main.c

Index: http_main.c
===================================================================
RCS file: /export/home/cvs/apache-1.3/src/main/http_main.c,v
retrieving revision 1.325
retrieving revision 1.326
diff -u -r1.325 -r1.326
--- http_main.c 1998/04/19 20:10:46 1.325
+++ http_main.c 1998/04/27 08:17:28 1.326
@@ -3960,6 +3960,10 @@
{
int c;

+#ifdef SOCKS
+ SOCKSinit(argv[0]);
+#endif
+
MONCONTROL(0);

common_init();