diff options
author | pst <pst@FreeBSD.org> | 1996-04-23 05:18:43 +0000 |
---|---|---|
committer | pst <pst@FreeBSD.org> | 1996-04-23 05:18:43 +0000 |
commit | d73d5ee489af9ec86a8ea3826fd9d5b014f3d84f (patch) | |
tree | a5cede8a25f13c625b46e62efa487feaca306544 /usr.bin/ftp | |
parent | 2a55e3d7aa65ad207f3877f30d105aefe47e30dd (diff) | |
download | FreeBSD-src-d73d5ee489af9ec86a8ea3826fd9d5b014f3d84f.zip FreeBSD-src-d73d5ee489af9ec86a8ea3826fd9d5b014f3d84f.tar.gz |
Add support for socks
Diffstat (limited to 'usr.bin/ftp')
-rw-r--r-- | usr.bin/ftp/Makefile | 7 | ||||
-rw-r--r-- | usr.bin/ftp/main.c | 4 |
2 files changed, 11 insertions, 0 deletions
diff --git a/usr.bin/ftp/Makefile b/usr.bin/ftp/Makefile index e9d0a62..12a718f 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 <bsd.prog.mk> diff --git a/usr.bin/ftp/main.c b/usr.bin/ftp/main.c index cca7a919..2a96c0a 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; |