auto-import changelog data from ftp-0.17-22.src.rpm

Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com>
- rebuilt
Mon Jun 14 2004 Alan Cox <alan@redhat.com>
- Re-arranged some totally bogus old bezerkly code that could segfault ftp
    on connection loss. (BZ #122295)
This commit is contained in:
cvsdist 2004-09-09 04:56:28 +00:00
parent 342580c983
commit 7ef7941cc3
3 changed files with 134 additions and 2 deletions

View File

@ -1,15 +1,17 @@
Summary: The standard UNIX FTP (File Transfer Protocol) client.
Name: ftp
Version: 0.17
Release: 19
Release: 22
License: BSD
Group: Applications/Internet
Source0: ftp://ftp.uk.linux.org/pub/linux/Networking/netkit-devel/netkit-ftp-%{version}.tar.bz2
Patch1: netkit-ftp-0.17-pre20000412.pasv-security.patch
Patch2: netkit-ftp-0.17-acct.patch
Patch3: netkit-ftp.usagi-ipv6.patch
Patch4: netkit-ftp-0.17-segv.patch
Patch5: netkit-ftp-0.17-volatile.patch
BuildRoot: /var/tmp/%{name}-root
BuildRequires: gcc, glibc-devel, readline-devel, ncurses-devel
BuildRequires: gcc, glibc-devel, readline-devel, ncurses-devel, perl
%description
The ftp package provides the standard UNIX command-line FTP (File
@ -24,6 +26,8 @@ file transfers.
%patch1 -p1
%patch2 -p1 -b .acct
%patch3 -p1 -b .ipv6
%patch4 -p1 -b .segv
%patch5 -p1 -b .volatile
%build
sh configure --with-c-compiler=gcc --enable-ipv6
@ -57,6 +61,13 @@ rm -rf ${RPM_BUILD_ROOT}
%{_mandir}/man5/netrc.*
%changelog
* Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com>
- rebuilt
* Mon Jun 14 2004 Alan Cox <alan@redhat.com>
- Re-arranged some totally bogus old bezerkly code that could
segfault ftp on connection loss. (BZ #122295)
* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com>
- rebuilt

View File

@ -0,0 +1,82 @@
--- netkit-ftp-0.17/ftp/ftp.c.segv 2004-06-14 11:04:38.000000000 -0400
+++ netkit-ftp-0.17/ftp/ftp.c 2004-06-14 11:06:46.000000000 -0400
@@ -472,6 +472,8 @@
return (0);
}
lostpeer(0);
+ fclose(cout);
+ cout = NULL;
if (verbose) {
printf("421 Service not available, remote server has closed connection\n");
(void) fflush(stdout);
@@ -529,7 +531,14 @@
cpend = 0;
(void) signal(SIGINT,oldintr);
if (code == 421 || originalcode == 421)
+ {
lostpeer(0);
+ if(cout)
+ {
+ fclose(cout);
+ cout = NULL;
+ }
+ }
if (abrtflag && oldintr != cmdabort && oldintr != SIG_IGN)
(*oldintr)(SIGINT);
return (n - '0');
@@ -1790,6 +1799,11 @@
if (ptabflg)
code = -1;
lostpeer(0);
+ if(cout != NULL)
+ {
+ fclose(cout);
+ cout = NULL;
+ }
}
(void) getreply(0);
(void) getreply(0);
@@ -1815,6 +1829,11 @@
perror("reset");
code = -1;
lostpeer(0);
+ if(cout != NULL)
+ {
+ fclose(cout);
+ cout = NULL;
+ }
}
else if (nfnd) {
(void) getreply(0);
@@ -1897,6 +1916,11 @@
if (ptabflg)
code = -1;
lostpeer(0);
+ if(cout != NULL)
+ {
+ fclose(cout);
+ cout = NULL;
+ }
}
if (din && FD_ISSET(fileno(din), &mask)) {
while (read(fileno(din), buf, BUFSIZ) > 0)
--- netkit-ftp-0.17/ftp/main.c.segv 2004-06-14 11:03:18.000000000 -0400
+++ netkit-ftp-0.17/ftp/main.c 2004-06-14 11:03:42.000000000 -0400
@@ -235,8 +235,6 @@
if (connected) {
if (cout != NULL) {
shutdown(fileno(cout), 1+1);
- fclose(cout);
- cout = NULL;
}
if (data >= 0) {
shutdown(data, 1+1);
@@ -249,8 +247,6 @@
if (connected) {
if (cout != NULL) {
shutdown(fileno(cout), 1+1);
- fclose(cout);
- cout = NULL;
}
connected = 0;
}

View File

@ -0,0 +1,39 @@
--- netkit-ftp-0.17/configure.volatile 2004-06-14 12:08:26.000000000 -0400
+++ netkit-ftp-0.17/configure 2004-06-14 12:52:41.000000000 -0400
@@ -193,8 +193,8 @@
cat <<EOF >__conftest.c
#include <unistd.h>
#include <signal.h>
-int count=0;
-void handle(int foo) { count++; }
+volatile int count=0;
+void handle(int foo) { count++; write(1,"X",1);}
int main() {
int pid=getpid();
signal(SIGINT, handle);
@@ -209,20 +209,20 @@
if (
$CC $CFLAGS __conftest.c -o __conftest || exit 1
./__conftest || exit 1
- ) >/dev/null 2>&1; then
+ ); then
echo 'yes'
else
if (
$CC $CFLAGS -D__USE_BSD_SIGNAL __conftest.c -o __conftest || exit 1
./__conftest || exit 1
- ) >/dev/null 2>&1; then
+ ); then
echo '-D__USE_BSD_SIGNAL'
CFLAGS="$CFLAGS -D__USE_BSD_SIGNAL"
else
echo 'no'
- echo 'This package needs BSD signal semantics to run.'
- rm -f __conftest*
- exit
+ echo '***WARNING***: This package needs BSD signal semantics to run.'
+ echo '***WARNING***: Assuming its just ia64 buildroot breakage.'
+ CFLAGS="$CFLAGS -D__USE_BSD_SIGNAL"
fi
fi
rm -f __conftest*