Add active mode option

This commit is contained in:
Jan Synacek 2012-08-28 12:25:50 +02:00
parent 81c6ecabf7
commit e4ce6c5b89
2 changed files with 41 additions and 1 deletions

View File

@ -1,7 +1,7 @@
Summary: The standard UNIX FTP (File Transfer Protocol) client
Name: ftp
Version: 0.17
Release: 58%{?dist}
Release: 59%{?dist}
License: BSD with advertising
Group: Applications/Internet
Source0: ftp://ftp.linux.org.uk/pub/linux/Networking/netkit/netkit-ftp-%{version}.tar.gz
@ -35,6 +35,7 @@ Patch26: netkit-ftp-0.17-man.patch
Patch27: netkit-ftp-0.17-acct_ovl.patch
Patch28: netkit-ftp-0.17-remove-nested-include.patch
Patch29: netkit-ftp-0.17-linelen.patch
Patch30: netkit-ftp-0.17-active-mode-option.patch
BuildRequires: glibc-devel, readline-devel, ncurses-devel
@ -77,6 +78,7 @@ file transfers.
%patch27 -p1 -b .acct_ovl
%patch28 -p1
%patch29 -p1 -b .linelen
%patch30 -p1 -b .activemode
%build
sh configure --with-c-compiler=gcc --enable-ipv6
@ -105,6 +107,9 @@ make INSTALLROOT=${RPM_BUILD_ROOT} install
%{_mandir}/man5/netrc.*
%changelog
* Tue Aug 28 2012 Jan Synáček <jsynacek@redhat.com> - 0.17-59
- Add active mode option
* Fri Aug 03 2012 Jan Synáček <jsynacek@redhat.com> - 0.17-58
- Extend the input line buffer and the argument storage buffer
- Prettify spec some more and remove trailing space

View File

@ -0,0 +1,35 @@
--- netkit-ftp-0.17/ftp/main.c.orig 2012-08-22 14:13:47.452058828 +0200
+++ netkit-ftp-0.17/ftp/main.c 2012-08-22 14:16:47.964124112 +0200
@@ -87,7 +87,8 @@ static
void
usage(void)
{
- printf("\n\tUsage: { ftp | pftp } [-pinegvtd] [hostname]\n");
+ printf("\n\tUsage: { ftp | pftp } [-Apinegvtd] [hostname]\n");
+ printf("\t -A: enable active mode\n");
printf("\t -p: enable passive mode (default for ftp and pftp)\n");
printf("\t -i: turn off prompting during mget\n");
printf("\t -n: inhibit auto-login\n");
@@ -166,6 +167,10 @@ main(volatile int argc, char **volatile
passivemode = 1;
break;
+ case 'A':
+ passivemode = 0;
+ break;
+
case 'g':
doglob = 0;
break;
--- netkit-ftp-0.17/ftp/ftp.1.orig 2009-10-26 15:38:34.000000000 -0500
+++ netkit-ftp-0.17/ftp/ftp.1 2009-10-26 15:41:12.000000000 -0500
@@ -58,6 +58,9 @@
Options may be specified at the command line, or to the
command interpreter.
.Bl -tag -width flag
+.It Fl A
+Use active mode for data transfers. This is useful for transmissions
+to servers which do not support passive connections (for whatever reason.)
.It Fl p
Use passive mode for data transfers. Allows use of ftp in environments
where a firewall prevents connections from the outside world back to