OpenBSD CVS

CVS log for src/libexec/ftp-proxy/Attic/ftp-proxy.c


[BACK] Up to [local] / src / libexec / ftp-proxy

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.42, Thu Nov 24 17:12:50 2005 UTC (18 years, 6 months ago) by deraadt
Branch: MAIN
CVS Tags: HEAD
Changes since 1.41: +1 -1 lines
FILE REMOVED

code is not being used; toss into Attic

Revision 1.41 / (download) - annotate - [select for diffs], Sat Mar 5 23:11:19 2005 UTC (19 years, 3 months ago) by cloder
Branch: MAIN
CVS Tags: OPENBSD_3_8_BASE, OPENBSD_3_8, OPENBSD_3_7_BASE, OPENBSD_3_7
Changes since 1.40: +9 -8 lines
Diff to previous 1.40 (colored)

Check snprintf return value for -1.
OK otto, henning, hshoexer, krw, beck

Revision 1.40 / (download) - annotate - [select for diffs], Thu Feb 24 15:49:08 2005 UTC (19 years, 3 months ago) by dhartmei
Branch: MAIN
Changes since 1.39: +4 -4 lines
Diff to previous 1.39 (colored)

const correctness, string literals are const char *, no functional change
from Joerg Sonnenberger joerg(at)britannica(dot)bec(dot)de

Revision 1.39 / (download) - annotate - [select for diffs], Wed Jan 19 20:58:59 2005 UTC (19 years, 4 months ago) by millert
Branch: MAIN
Changes since 1.38: +2 -2 lines
Diff to previous 1.38 (colored)

Fix -S flag for non-root; from Ewen McNeill (closes PR 4066)
OK dhartmei@ and hshoexer@

Revision 1.38 / (download) - annotate - [select for diffs], Fri Nov 19 00:47:23 2004 UTC (19 years, 6 months ago) by jmc
Branch: MAIN
Changes since 1.37: +4 -4 lines
Diff to previous 1.37 (colored)

options sort and sync usage();
from wiz@netbsd

Revision 1.37 / (download) - annotate - [select for diffs], Sun Jul 11 01:54:36 2004 UTC (19 years, 10 months ago) by brad
Branch: MAIN
CVS Tags: OPENBSD_3_6_BASE, OPENBSD_3_6
Changes since 1.36: +2 -2 lines
Diff to previous 1.36 (colored)

addr -> address in usage() for consistency.

Revision 1.36 / (download) - annotate - [select for diffs], Tue Jul 6 19:49:11 2004 UTC (19 years, 11 months ago) by dhartmei
Branch: MAIN
Changes since 1.35: +49 -6 lines
Diff to previous 1.35 (colored)

The 'reverse ftp-proxy' mode adds a command line option -R to
ftp-proxy which proxies connection from external ftp clients to
an internal ftp server, supporting client passive mode (where
server listens on a random port for data connections, and the
client connects to the server for data connections).

This is the reverse mode to normal operation, where ftp-proxy
proxies connections from local clients to external servers,
supporting client active mode.

ok beck@, henning@

Revision 1.35 / (download) - annotate - [select for diffs], Sun Mar 14 21:51:44 2004 UTC (20 years, 2 months ago) by dhartmei
Branch: MAIN
CVS Tags: OPENBSD_3_5_BASE, OPENBSD_3_5
Changes since 1.34: +2 -2 lines
Diff to previous 1.34 (colored)

#include fixes, from Max Laier, ok beck@ henning@

Revision 1.34 / (download) - annotate - [select for diffs], Thu Jan 22 16:10:30 2004 UTC (20 years, 4 months ago) by beck
Branch: MAIN
Changes since 1.33: +14 -5 lines
Diff to previous 1.33 (colored)

Add a -a address option to set the address which the proxy will use
to bind the local end of outgoing connections, and some man page
cleanup. Based on diff provided in pr 3538 by Karl O. Pinc <kop@meme.com>
Closes pr 3538. ok dhartmei@

Revision 1.33 / (download) - annotate - [select for diffs], Fri Aug 22 21:50:34 2003 UTC (20 years, 9 months ago) by david
Branch: MAIN
CVS Tags: OPENBSD_3_4_BASE, OPENBSD_3_4
Changes since 1.32: +2 -2 lines
Diff to previous 1.32 (colored)

pf spelling police
ok dhartmei@ jmc@

Revision 1.32 / (download) - annotate - [select for diffs], Tue Jul 29 14:46:06 2003 UTC (20 years, 10 months ago) by henning
Branch: MAIN
Changes since 1.31: +3 -1 lines
Diff to previous 1.31 (colored)

correctly handle multiline responses with leading space followed by number
PR3378 mayonez@ssnet.xim.pl, thanks!

Revision 1.31 / (download) - annotate - [select for diffs], Sat Jun 28 01:04:57 2003 UTC (20 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.30: +8 -3 lines
Diff to previous 1.30 (colored)

missing protos

Revision 1.30 / (download) - annotate - [select for diffs], Mon Jun 23 17:22:29 2003 UTC (20 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.29: +14 -17 lines
Diff to previous 1.29 (colored)

delinting from beck

Revision 1.29 / (download) - annotate - [select for diffs], Thu Mar 20 01:34:48 2003 UTC (21 years, 2 months ago) by david
Branch: MAIN
CVS Tags: OPENBSD_3_3_BASE, OPENBSD_3_3
Changes since 1.28: +4 -4 lines
Diff to previous 1.28 (colored)

cmdline options in alphabetical order in usage() and manpage
and make sure they are consistent

ok dhartmei@ henning@

Revision 1.28 / (download) - annotate - [select for diffs], Thu Jan 23 23:15:16 2003 UTC (21 years, 4 months ago) by djm
Branch: MAIN
Changes since 1.27: +14 -3 lines
Diff to previous 1.27 (colored)

Honour TCP_WRAPPERS mk.conf setting; ok millert@

Revision 1.27 / (download) - annotate - [select for diffs], Thu Dec 19 18:19:10 2002 UTC (21 years, 5 months ago) by deraadt
Branch: MAIN
Changes since 1.26: +65 -56 lines
Diff to previous 1.26 (colored)

various tweaks.  someone mailed in a huge diff that was so wrong in so
many ways, and i wasted 2 hours finding the gems in it...

Revision 1.26 / (download) - annotate - [select for diffs], Thu Dec 19 01:29:03 2002 UTC (21 years, 5 months ago) by deraadt
Branch: MAIN
Changes since 1.25: +57 -65 lines
Diff to previous 1.25 (colored)

accidental commit

Revision 1.25 / (download) - annotate - [select for diffs], Thu Dec 19 01:27:56 2002 UTC (21 years, 5 months ago) by deraadt
Branch: MAIN
Changes since 1.24: +66 -58 lines
Diff to previous 1.24 (colored)

missing .Pp

Revision 1.24 / (download) - annotate - [select for diffs], Sun Jul 7 08:54:50 2002 UTC (21 years, 11 months ago) by jufi
Branch: MAIN
CVS Tags: OPENBSD_3_2_BASE, OPENBSD_3_2
Changes since 1.23: +3 -3 lines
Diff to previous 1.23 (colored)


typos/grammar/better words
in comments.

Revision 1.23 / (download) - annotate - [select for diffs], Wed Jul 3 23:39:03 2002 UTC (21 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.22: +10 -10 lines
Diff to previous 1.22 (colored)

KNF

Revision 1.22 / (download) - annotate - [select for diffs], Sun Jun 9 01:03:12 2002 UTC (21 years, 11 months ago) by beck
Branch: MAIN
Changes since 1.21: +24 -24 lines
Diff to previous 1.21 (colored)

no newlines in syslog

Revision 1.21 / (download) - annotate - [select for diffs], Thu May 23 10:22:14 2002 UTC (22 years ago) by deraadt
Branch: MAIN
Changes since 1.20: +19 -31 lines
Diff to previous 1.20 (colored)

KNF during an audit; found an improperly initialized sockaddr

Revision 1.20 / (download) - annotate - [select for diffs], Tue Mar 12 08:01:51 2002 UTC (22 years, 2 months ago) by dhartmei
Branch: MAIN
CVS Tags: OPENBSD_3_1_BASE, OPENBSD_3_1
Changes since 1.19: +6 -5 lines
Diff to previous 1.19 (colored)

Pass full length to strlcat(). From Brian Poole.

Revision 1.19 / (download) - annotate - [select for diffs], Thu Jan 10 19:35:07 2002 UTC (22 years, 4 months ago) by mickey
Branch: MAIN
Changes since 1.18: +4 -4 lines
Diff to previous 1.18 (colored)

print proper host name for the proxy's peer; bob ok

Revision 1.18 / (download) - annotate - [select for diffs], Fri Dec 14 18:12:41 2001 UTC (22 years, 5 months ago) by beck
Branch: MAIN
Changes since 1.17: +8 -5 lines
Diff to previous 1.17 (colored)

RFC 959 wasn't clear about what happens around a PASV reply, and in
fact RFC 1123 does say that it may not contain parenthesis, and you
just have to look at the end of the line. Tholo managed to find a
TOPS20 ftp server (toad.xkl.com) that doesn't put parens around the
reply - This fixes it so it will handle either case.

Revision 1.17 / (download) - annotate - [select for diffs], Wed Oct 10 15:32:39 2001 UTC (22 years, 7 months ago) by beck
Branch: MAIN
CVS Tags: OPENBSD_3_0_BASE, OPENBSD_3_0
Changes since 1.16: +13 -2 lines
Diff to previous 1.16 (colored)

  fix multi-line contunuations - ok deraadt@

Revision 1.16 / (download) - annotate - [select for diffs], Fri Sep 21 18:06:25 2001 UTC (22 years, 8 months ago) by beck
Branch: MAIN
Changes since 1.15: +2 -2 lines
Diff to previous 1.15 (colored)

 Drop privs to named group, not group with same name as user.
noticed by itojun, thanks.

 fries, you need to catch this for what you're using with faithd

Revision 1.15 / (download) - annotate - [select for diffs], Wed Sep 5 20:40:10 2001 UTC (22 years, 9 months ago) by beck
Branch: MAIN
Changes since 1.14: +6 -5 lines
Diff to previous 1.14 (colored)

-Make ftp-proxy drop privs to user "proxy" by default.
   *WARNING* this means that it will die when it can't find user proxy
   if you are not running with a passwd database generated from current
- Speling cleanup and missing va_end() noticed by  <d.doroshenko@omnitel.net>
- fix logging of getpwnam|getgrnam failures.

Revision 1.14 / (download) - annotate - [select for diffs], Tue Aug 28 19:57:29 2001 UTC (22 years, 9 months ago) by beck
Branch: MAIN
Changes since 1.13: +1 -10 lines
Diff to previous 1.13 (colored)

remove unneeded code (this is done later)

Revision 1.13 / (download) - annotate - [select for diffs], Tue Aug 28 19:35:04 2001 UTC (22 years, 9 months ago) by deraadt
Branch: MAIN
Changes since 1.12: +58 -77 lines
Diff to previous 1.12 (colored)

oh, some cleanups etc etc

Revision 1.12 / (download) - annotate - [select for diffs], Wed Aug 22 05:28:16 2001 UTC (22 years, 9 months ago) by beck
Branch: MAIN
Changes since 1.11: +305 -233 lines
Diff to previous 1.11 (colored)

-Functionify some of the main loop, so it isn't so horrificly deep and is
a bit easier to look at, for small values of easier.

-Add two options for -u user and -g group to optionally make the proxy drop
privs after doing it's pf ioctl's to find out where to go. Running as non
root does mean that the PORT and EPRT backchannels do not come from port 20,
but this isn't a problem for most sensible ftp clients and sets of packet
filter rules that aren't written by a knuckle dragging ape living in the 90's.
I would make it drop privs by default, but technically this breaks the ftp
specs, and for the upcoming stuff to deal with EPRT, we will need root privs
to manipulate rdr rules).

Revision 1.11 / (download) - annotate - [select for diffs], Sun Aug 19 20:43:56 2001 UTC (22 years, 9 months ago) by beck
Branch: MAIN
Changes since 1.10: +20 -22 lines
Diff to previous 1.10 (colored)

unsmokecrack - thanks millert

Revision 1.10 / (download) - annotate - [select for diffs], Sun Aug 19 18:24:13 2001 UTC (22 years, 9 months ago) by beck
Branch: MAIN
Changes since 1.9: +25 -37 lines
Diff to previous 1.9 (colored)

decruftify with prejudice

Revision 1.9 / (download) - annotate - [select for diffs], Sun Aug 19 17:33:12 2001 UTC (22 years, 9 months ago) by beck
Branch: MAIN
Changes since 1.8: +8 -29 lines
Diff to previous 1.8 (colored)

decruftify

Revision 1.8 / (download) - annotate - [select for diffs], Sun Aug 19 17:20:34 2001 UTC (22 years, 9 months ago) by beck
Branch: MAIN
Changes since 1.7: +2 -2 lines
Diff to previous 1.7 (colored)

Argh. I must be wearing a stupid sign today

Revision 1.7 / (download) - annotate - [select for diffs], Sun Aug 19 15:37:01 2001 UTC (22 years, 9 months ago) by beck
Branch: MAIN
Changes since 1.6: +21 -8 lines
Diff to previous 1.6 (colored)

bye bye atoi.

Revision 1.6 / (download) - annotate - [select for diffs], Sun Aug 19 15:19:28 2001 UTC (22 years, 9 months ago) by beck
Branch: MAIN
Changes since 1.5: +3 -3 lines
Diff to previous 1.5 (colored)

oops

Revision 1.5 / (download) - annotate - [select for diffs], Sun Aug 19 15:02:02 2001 UTC (22 years, 9 months ago) by beck
Branch: MAIN
Changes since 1.4: +39 -28 lines
Diff to previous 1.4 (colored)

I'm a knuckle-dragging moron, the fd_set is overflowable - make it so
it isn't.

Revision 1.4 / (download) - annotate - [select for diffs], Sun Aug 19 13:43:09 2001 UTC (22 years, 9 months ago) by deraadt
Branch: MAIN
Changes since 1.3: +222 -272 lines
Diff to previous 1.3 (colored)

1564 lines of cleanup

Revision 1.3 / (download) - annotate - [select for diffs], Sun Aug 19 05:50:50 2001 UTC (22 years, 9 months ago) by beck
Branch: MAIN
Changes since 1.2: +5 -11 lines
Diff to previous 1.2 (colored)

KNF

Revision 1.2 / (download) - annotate - [select for diffs], Sun Aug 19 05:22:37 2001 UTC (22 years, 9 months ago) by beck
Branch: MAIN
Changes since 1.1: +8 -13 lines
Diff to previous 1.1 (colored)

gratuitous KNFism's, don't have it looking like it's your first day
with your new crack pipe

Revision 1.1 / (download) - annotate - [select for diffs], Sun Aug 19 04:11:12 2001 UTC (22 years, 9 months ago) by beck
Branch: MAIN

transparent ftp proxy, based on Obtuse Systems juniper stuff with much
modernizing and cleanup. still needs looking at.

Currently supports PORT PASV EPRT data connections with only a pf rdr to
capture the control connection. (I.E. you don't need ip forwarding
or other NAT stuff). Runs from inetd.

Supports all passive (EPSV PASV) when using -n flag, where the proxy
ignores passive mode data connections (and assumes nat will get them
through).

Todo yet:
	More audit
	IpV6
	Handle EPSV in proxy (with an rdr added then removed)
	Option to Daemonize and bind only to the loopback
	More Content/Login filtering, etc. etc. and more bloat

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.