diff options
author | pst <pst@FreeBSD.org> | 1994-10-06 23:57:21 +0000 |
---|---|---|
committer | pst <pst@FreeBSD.org> | 1994-10-06 23:57:21 +0000 |
commit | e377ba704ad289692f56f53811c3c0ba5d8b670b (patch) | |
tree | 7d1f20f72956420770324bd8db0d2494bdad50d5 /usr.bin/ncftp/main.c | |
parent | 3f5ed875460ccb40d3472af4124034f995a9ce28 (diff) | |
download | FreeBSD-src-e377ba704ad289692f56f53811c3c0ba5d8b670b.zip FreeBSD-src-e377ba704ad289692f56f53811c3c0ba5d8b670b.tar.gz |
(a) there's no reason for PASSIVEMODE to be conditionally compiled since it's
controlled by a runtime switch.
(b) add '-P' to toggle passive mode from the command line
(c) turn on passive mode by default
- passive mode ftp works on all but a few servers out there
- it's easy to disable
- no, standard ftp should not run with passive enabled by default,
but that doesn't matter because I've already fixed standard mode
ftp to take a switch
This really should have been implemented as a ncftp "set" command instead
of carrying over the same hack that was done to ftp. I will go back and fix
it some day.
Diffstat (limited to 'usr.bin/ncftp/main.c')
-rw-r--r-- | usr.bin/ncftp/main.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/usr.bin/ncftp/main.c b/usr.bin/ncftp/main.c index e2f620a..f8dd512 100644 --- a/usr.bin/ncftp/main.c +++ b/usr.bin/ncftp/main.c @@ -116,7 +116,7 @@ static char tcbuf[2048]; #endif /* main.c externs */ -extern int debug, verbose, mprompt; +extern int debug, verbose, mprompt, passivemode; extern int options, cpend, data, connected, logged_in; extern int curtype, macnum, remote_is_unix; extern FILE *cout; @@ -175,6 +175,7 @@ Re-compile, this time with -DZCAT=\\\"/path/to/zcat\\\".\n"); mprompt = dMPROMPT; debug = dDEBUG; verbose = dVERBOSE; + passivemode = dPASSIVE; (void) Strncpy(vstr, short_verbose_msgs[verbose+1]); (void) Strncpy(curtypename, dTYPESTR); @@ -270,6 +271,10 @@ Re-compile, this time with -DZCAT=\\\"/path/to/zcat\\\".\n"); ++ignore_rc; break; + case 'P': + passivemode = !passivemode; + break; + case 'H': (void) show_version(0, NULL); exit (0); @@ -282,6 +287,7 @@ Program Options:\n\ -H : Show version and compilation information.\n\ -I : Toggle interactive (mprompt) mode.\n\ -N : Toggle reading of the .netrc/.ncftprc.\n\ + -P : Toggle passive mode ftp (for use behind firewalls).\n\ -V x : Set verbosity to level x (-1,0,1,2).\n\ Open Options:\n\ -a : Open anonymously (this is the default).\n\ |