From 33bb8564be545e139fb43329ff65d64198713804 Mon Sep 17 00:00:00 2001 From: Paul Traina Date: Tue, 23 Apr 1996 05:18:43 +0000 Subject: [PATCH] Add support for socks --- eBones/usr.bin/telnet/Makefile | 9 ++++++++- eBones/usr.bin/telnet/main.c | 4 ++++ secure/usr.bin/telnet/Makefile | 9 ++++++++- secure/usr.bin/telnet/main.c | 4 ++++ usr.bin/ftp/Makefile | 7 +++++++ usr.bin/ftp/main.c | 4 ++++ usr.bin/telnet/Makefile | 9 ++++++++- usr.bin/telnet/main.c | 4 ++++ 8 files changed, 47 insertions(+), 3 deletions(-) diff --git a/eBones/usr.bin/telnet/Makefile b/eBones/usr.bin/telnet/Makefile index 87ee4cf6c60f..0a3fdc0c5c26 100644 --- a/eBones/usr.bin/telnet/Makefile +++ b/eBones/usr.bin/telnet/Makefile @@ -31,7 +31,7 @@ # SUCH DAMAGE. # # @(#)Makefile 8.1 (Berkeley) 6/6/93 -# $Id$ +# $Id: Makefile,v 1.13 1996/03/11 16:17:58 markm Exp $ # PROG= telnet @@ -53,4 +53,11 @@ DPADD+= ${LIBDES} ${LIBKRB} # Used only in krb4encpwd.c and rsaencpwd.c (libtelnet), not yet active #LDADD+= -ldescrypt +.if defined(SOCKS) +CFLAGS+=-DSOCKS +CFLAGS+=-Dconnect=Rconnect -Dgetsockname=Rgetsockname -Dlisten=Rlisten \ + -Daccept=Raccept -Drcmd=Rrcmd -Dbind=Rbind -Dselect=Rselect +LDADD+= -lsocks +.endif + .include diff --git a/eBones/usr.bin/telnet/main.c b/eBones/usr.bin/telnet/main.c index 09ac26c38caf..08cb57846848 100644 --- a/eBones/usr.bin/telnet/main.c +++ b/eBones/usr.bin/telnet/main.c @@ -122,6 +122,10 @@ main(argc, argv) extern int forward_flags; #endif /* FORWARD */ +#ifdef SOCKS + SOCKSinit(argv[0]); +#endif /* SOCKS */ + tninit(); /* Clear out things */ #if defined(CRAY) && !defined(__STDC__) _setlist_init(); /* Work around compiler bug */ diff --git a/secure/usr.bin/telnet/Makefile b/secure/usr.bin/telnet/Makefile index 87ee4cf6c60f..0a3fdc0c5c26 100644 --- a/secure/usr.bin/telnet/Makefile +++ b/secure/usr.bin/telnet/Makefile @@ -31,7 +31,7 @@ # SUCH DAMAGE. # # @(#)Makefile 8.1 (Berkeley) 6/6/93 -# $Id$ +# $Id: Makefile,v 1.13 1996/03/11 16:17:58 markm Exp $ # PROG= telnet @@ -53,4 +53,11 @@ DPADD+= ${LIBDES} ${LIBKRB} # Used only in krb4encpwd.c and rsaencpwd.c (libtelnet), not yet active #LDADD+= -ldescrypt +.if defined(SOCKS) +CFLAGS+=-DSOCKS +CFLAGS+=-Dconnect=Rconnect -Dgetsockname=Rgetsockname -Dlisten=Rlisten \ + -Daccept=Raccept -Drcmd=Rrcmd -Dbind=Rbind -Dselect=Rselect +LDADD+= -lsocks +.endif + .include diff --git a/secure/usr.bin/telnet/main.c b/secure/usr.bin/telnet/main.c index 09ac26c38caf..08cb57846848 100644 --- a/secure/usr.bin/telnet/main.c +++ b/secure/usr.bin/telnet/main.c @@ -122,6 +122,10 @@ main(argc, argv) extern int forward_flags; #endif /* FORWARD */ +#ifdef SOCKS + SOCKSinit(argv[0]); +#endif /* SOCKS */ + tninit(); /* Clear out things */ #if defined(CRAY) && !defined(__STDC__) _setlist_init(); /* Work around compiler bug */ diff --git a/usr.bin/ftp/Makefile b/usr.bin/ftp/Makefile index e9d0a6248c0e..12a718fc58a8 100644 --- a/usr.bin/ftp/Makefile +++ b/usr.bin/ftp/Makefile @@ -6,4 +6,11 @@ LINKS= ${BINDIR}/ftp ${BINDIR}/pftp MLINKS= ftp.1 pftp.1 CFLAGS+=-DFTP_DATA_BOTTOM=40000 -DFTP_DATA_TOP=44999 +.if defined(SOCKS) +CFLAGS+=-DSOCKS +CFLAGS+=-Dconnect=Rconnect -Dgetsockname=Rgetsockname -Dlisten=Rlisten \ + -Daccept=Raccept -Drcmd=Rrcmd -Dbind=Rbind -Dselect=Rselect +LDADD+= -lsocks +.endif + .include diff --git a/usr.bin/ftp/main.c b/usr.bin/ftp/main.c index cca7a9193717..2a96c0ac6949 100644 --- a/usr.bin/ftp/main.c +++ b/usr.bin/ftp/main.c @@ -72,6 +72,10 @@ main(argc, argv) char *cp, homedir[MAXPATHLEN]; struct servent sp_default; +#ifdef SOCKS + SOCKSinit(argv[0]); +#endif + sp = getservbyname("ftp", "tcp"); if (sp == 0) { sp = &sp_default; diff --git a/usr.bin/telnet/Makefile b/usr.bin/telnet/Makefile index fee9815c16a0..19222b44ab52 100644 --- a/usr.bin/telnet/Makefile +++ b/usr.bin/telnet/Makefile @@ -42,7 +42,7 @@ CFLAGS+=-I${.CURDIR}/../../lib #CFLAGS+= -DKRB4 LDADD= -ltermcap -ltelnet -#LDADD+= -lkrb -ldes +#LDADD+=-lkrb -ldes DPADD= ${LIBTERMCAP} SRCS= authenc.c commands.c main.c network.c ring.c sys_bsd.c telnet.c \ @@ -53,6 +53,13 @@ CRYPT_SRC= authenc.c commands.c externs.h main.c network.c CRYPT_SRC+= ring.c ring.h telnet.c terminal.c utilities.c Makefile NOCRYPT_DIR=${.CURDIR}/Nocrypt +.if defined(SOCKS) +CFLAGS+=-DSOCKS +CFLAGS+=-Dconnect=Rconnect -Dgetsockname=Rgetsockname -Dlisten=Rlisten \ + -Daccept=Raccept -Drcmd=Rrcmd -Dbind=Rbind -Dselect=Rselect +LDADD+= -lsocks +.endif + .include nocrypt: diff --git a/usr.bin/telnet/main.c b/usr.bin/telnet/main.c index 896405cde7f9..f9d64550c762 100644 --- a/usr.bin/telnet/main.c +++ b/usr.bin/telnet/main.c @@ -118,6 +118,10 @@ main(argc, argv) extern int forward_flags; #endif /* FORWARD */ +#ifdef SOCKS + SOCKSinit(argv[0]); +#endif /* SOCKS */ + tninit(); /* Clear out things */ #if defined(CRAY) && !defined(__STDC__) _setlist_init(); /* Work around compiler bug */