ftp does not close socket descriptor (See #174599)
This commit is contained in:
parent
2f28aa5eb3
commit
4ca5a3037c
9
ftp.spec
9
ftp.spec
@ -1,7 +1,7 @@
|
|||||||
Summary: The standard UNIX FTP (File Transfer Protocol) client.
|
Summary: The standard UNIX FTP (File Transfer Protocol) client.
|
||||||
Name: ftp
|
Name: ftp
|
||||||
Version: 0.17
|
Version: 0.17
|
||||||
Release: 30
|
Release: 31
|
||||||
License: BSD
|
License: BSD
|
||||||
Group: Applications/Internet
|
Group: Applications/Internet
|
||||||
Source0: ftp://ftp.uk.linux.org/pub/linux/Networking/netkit-devel/netkit-ftp-%{version}.tar.bz2
|
Source0: ftp://ftp.uk.linux.org/pub/linux/Networking/netkit-devel/netkit-ftp-%{version}.tar.bz2
|
||||||
@ -16,6 +16,7 @@ Patch8: netkit-ftp-0.17-printf.patch
|
|||||||
Patch9: netkit-ftp-0.17-longint.patch
|
Patch9: netkit-ftp-0.17-longint.patch
|
||||||
Patch10: netkit-ftp-0.17-vsftp165083.patch
|
Patch10: netkit-ftp-0.17-vsftp165083.patch
|
||||||
Patch11: netkit-ftp-0.17-C-Frame121.patch
|
Patch11: netkit-ftp-0.17-C-Frame121.patch
|
||||||
|
Patch12: netkit-ftp-0.17-data.patch
|
||||||
BuildRoot: /var/tmp/%{name}-root
|
BuildRoot: /var/tmp/%{name}-root
|
||||||
BuildRequires: gcc, glibc-devel, readline-devel, ncurses-devel, perl
|
BuildRequires: gcc, glibc-devel, readline-devel, ncurses-devel, perl
|
||||||
|
|
||||||
@ -40,6 +41,7 @@ file transfers.
|
|||||||
%patch9 -p1 -b .longint
|
%patch9 -p1 -b .longint
|
||||||
%patch10 -p1 -b .vsftp165083
|
%patch10 -p1 -b .vsftp165083
|
||||||
%patch11 -p1 -b .C-Frame121
|
%patch11 -p1 -b .C-Frame121
|
||||||
|
%patch12 -p1 -b .data
|
||||||
|
|
||||||
%build
|
%build
|
||||||
sh configure --with-c-compiler=gcc --enable-ipv6
|
sh configure --with-c-compiler=gcc --enable-ipv6
|
||||||
@ -73,6 +75,11 @@ rm -rf ${RPM_BUILD_ROOT}
|
|||||||
%{_mandir}/man5/netrc.*
|
%{_mandir}/man5/netrc.*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Dec 2 2005 Petr Raszyk <praszyk@redhat.com> - 0.17-31
|
||||||
|
- ftp does not close socket descriptor (if the remote file
|
||||||
|
does not exist).
|
||||||
|
See #174599, netkit-ftp-0.17-data.patch
|
||||||
|
|
||||||
* Wed Oct 26 2005 Petr Raszyk <praszyk@redhat.com> - 0.17-30
|
* Wed Oct 26 2005 Petr Raszyk <praszyk@redhat.com> - 0.17-30
|
||||||
- The patch netkit-ftp-0.17-C-Frame121.patch adds some
|
- The patch netkit-ftp-0.17-C-Frame121.patch adds some
|
||||||
comments/hints for C-Frame 121. It can be removed any time.
|
comments/hints for C-Frame 121. It can be removed any time.
|
||||||
|
24
netkit-ftp-0.17-data.patch
Normal file
24
netkit-ftp-0.17-data.patch
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
--- netkit-ftp-0.17/ftp/ftp.c.data 2005-12-02 15:31:27.000000000 +0100
|
||||||
|
+++ netkit-ftp-0.17/ftp/ftp.c 2005-12-02 15:35:46.000000000 +0100
|
||||||
|
@@ -1223,6 +1223,7 @@
|
||||||
|
static int
|
||||||
|
initconn(void)
|
||||||
|
{
|
||||||
|
+ int rc;
|
||||||
|
u_char *p, *a;
|
||||||
|
int result, tmpno = 0;
|
||||||
|
socklen_t len;
|
||||||
|
@@ -1240,6 +1241,13 @@
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
if (passivemode) {
|
||||||
|
+ if (data >= 0){
|
||||||
|
+ rc = close (data);
|
||||||
|
+ data = -1;
|
||||||
|
+ if (rc == -1){
|
||||||
|
+ perror ("ftp: close");
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
data_addr = hisctladdr;
|
||||||
|
data = socket(data_addr.su_family, SOCK_STREAM, 0);
|
||||||
|
if (data < 0) {
|
Loading…
Reference in New Issue
Block a user