diff options
author | pst <pst@FreeBSD.org> | 1995-08-05 19:12:05 +0000 |
---|---|---|
committer | pst <pst@FreeBSD.org> | 1995-08-05 19:12:05 +0000 |
commit | 0e79ca4d900784f6fb111f73eee3ea92efdc87be (patch) | |
tree | 0bb9b657884348aa946f639d6e015b17af89ad79 /usr.bin/ftp/main.c | |
parent | f87a14f2ec9b2da3dd881d031cc3eb22beded92e (diff) | |
download | FreeBSD-src-0e79ca4d900784f6fb111f73eee3ea92efdc87be.zip FreeBSD-src-0e79ca4d900784f6fb111f73eee3ea92efdc87be.tar.gz |
Use data ports in the range 40000..44999 by default to enhance FTP usability
in a firewall environment. Original idea by Mark Tracy (?).
Reviewed by: wollman
Submitted by: pst
Diffstat (limited to 'usr.bin/ftp/main.c')
-rw-r--r-- | usr.bin/ftp/main.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.bin/ftp/main.c b/usr.bin/ftp/main.c index 7df165c..cca7a919 100644 --- a/usr.bin/ftp/main.c +++ b/usr.bin/ftp/main.c @@ -82,13 +82,14 @@ main(argc, argv) interactive = 1; autologin = 1; passivemode = 0; + restricted_data_ports = 1; cp = strrchr(argv[0], '/'); cp = (cp == NULL) ? argv[0] : cp+1; if (strcmp(cp, "pftp") == 0) passivemode = 1; - while ((ch = getopt(argc, argv, "dginptv")) != EOF) { + while ((ch = getopt(argc, argv, "dginptvU")) != EOF) { switch (ch) { case 'd': options |= SO_DEBUG; @@ -119,6 +120,10 @@ main(argc, argv) verbose++; break; + case 'U': + restricted_data_ports = 0; + break; + default: (void)fprintf(stderr, "usage: ftp [-dginptv] [host [port]]\n"); |