- Fix passive mode with SELinux (#158234, patch by Nalin Dahyabhai)

- Fix format string mismatch
This commit is contained in:
Miloslav Trmac 2005-05-24 20:15:26 +00:00
parent c38e62c33e
commit 31a01a307f
3 changed files with 30 additions and 10 deletions

View File

@ -1,7 +1,7 @@
Summary: The standard UNIX FTP (File Transfer Protocol) client.
Name: ftp
Version: 0.17
Release: 25
Release: 26
License: BSD
Group: Applications/Internet
Source0: ftp://ftp.uk.linux.org/pub/linux/Networking/netkit-devel/netkit-ftp-%{version}.tar.bz2
@ -12,6 +12,7 @@ Patch4: netkit-ftp-0.17-segv.patch
Patch5: netkit-ftp-0.17-volatile.patch
Patch6: netkit-ftp-0.17-runique_mget.patch
Patch7: netkit-ftp-locale.patch
Patch8: netkit-ftp-0.17-printf.patch
BuildRoot: /var/tmp/%{name}-root
BuildRequires: gcc, glibc-devel, readline-devel, ncurses-devel, perl
@ -32,6 +33,7 @@ file transfers.
%patch5 -p1 -b .volatile
%patch6 -p1 -b .runique_mget
%patch7 -p1 -b .locale
%patch8 -p1 -b .printf
%build
sh configure --with-c-compiler=gcc --enable-ipv6
@ -65,6 +67,10 @@ rm -rf ${RPM_BUILD_ROOT}
%{_mandir}/man5/netrc.*
%changelog
* Tue May 24 2005 Miloslav Trmac <mitr@redhat.com> - 0.17-26
- Fix passive mode with SELinux (#158234, patch by Nalin Dahyabhai)
- Fix format string mismatch
* Fri Mar 04 2005 Jiri Ryska <jryska@redhat.com>
- rebuilt

View File

@ -0,0 +1,11 @@
--- netkit-ftp-0.17/ftp/cmds.c.printf 2005-05-24 22:12:24.000000000 +0200
+++ netkit-ftp-0.17/ftp/cmds.c 2005-05-24 22:12:37.000000000 +0200
@@ -2223,7 +2223,7 @@
printf("restart: offset not specified\n");
else {
restart_point = atol(argv[1]);
- printf("restarting at %ld. %s\n", restart_point,
+ printf("restarting at %ld. %s\n", (long)restart_point,
"execute get, put or append to initiate transfer");
}
}

View File

@ -533,7 +533,7 @@ diff -uNr netkit-ftp-0.17/ftp/ftp.c netkit-ftp/ftp/ftp.c
if (data < 0) {
perror("ftp: socket");
return(1);
@@ -1100,52 +1209,201 @@
@@ -1100,52 +1209,203 @@
setsockopt(data, SOL_SOCKET, SO_DEBUG, (char *)&on,
sizeof (on)) < 0)
perror("ftp: setsockopt (ignored)");
@ -727,7 +727,10 @@ diff -uNr netkit-ftp-0.17/ftp/ftp.c netkit-ftp/ftp/ftp.c
- data_addr.sin_port = htons((p1 << 8) | p2);
-
if (connect(data, (struct sockaddr *) &data_addr,
sizeof(data_addr))<0) {
- sizeof(data_addr))<0) {
+ (data_addr.su_family == AF_INET ?
+ sizeof(data_addr.su_sin) :
+ sizeof(data_addr.su_sin6)))<0) {
perror("ftp: connect");
return(1);
}
@ -754,7 +757,7 @@ diff -uNr netkit-ftp-0.17/ftp/ftp.c netkit-ftp/ftp/ftp.c
if (data < 0) {
perror("ftp: socket");
if (tmpno)
@@ -1172,13 +1430,47 @@
@@ -1172,13 +1432,47 @@
if (listen(data, 1) < 0)
perror("ftp: listen");
if (sendport) {
@ -809,7 +812,7 @@ diff -uNr netkit-ftp-0.17/ftp/ftp.c netkit-ftp/ftp/ftp.c
if (result == ERROR && sendport == -1) {
sendport = 0;
tmpno = 1;
@@ -1189,9 +1481,12 @@
@@ -1189,9 +1483,12 @@
if (tmpno)
sendport = 1;
#ifdef IP_TOS
@ -822,7 +825,7 @@ diff -uNr netkit-ftp-0.17/ftp/ftp.c netkit-ftp/ftp/ftp.c
#endif
return (0);
bad:
@@ -1204,7 +1499,7 @@
@@ -1204,7 +1501,7 @@
static FILE *
dataconn(const char *lmode)
{
@ -831,7 +834,7 @@ diff -uNr netkit-ftp-0.17/ftp/ftp.c netkit-ftp/ftp/ftp.c
int s, tos;
socklen_t fromlen = sizeof(from);
@@ -1220,9 +1515,12 @@
@@ -1220,9 +1517,12 @@
(void) close(data);
data = s;
#ifdef IP_TOS
@ -844,7 +847,7 @@ diff -uNr netkit-ftp-0.17/ftp/ftp.c netkit-ftp/ftp/ftp.c
#endif
return (fdopen(data, lmode));
}
@@ -1284,8 +1582,8 @@
@@ -1284,8 +1584,8 @@
static struct comvars {
int connect;
char name[MAXHOSTNAMELEN];
@ -855,7 +858,7 @@ diff -uNr netkit-ftp-0.17/ftp/ftp.c netkit-ftp/ftp/ftp.c
FILE *in;
FILE *out;
int tpe;
@@ -1323,7 +1621,7 @@
@@ -1323,7 +1623,7 @@
connected = op->connect;
if (hostname) {
(void) strncpy(ip->name, hostname, sizeof(ip->name) - 1);
@ -864,7 +867,7 @@ diff -uNr netkit-ftp-0.17/ftp/ftp.c netkit-ftp/ftp/ftp.c
}
else {
ip->name[0] = 0;
@@ -1352,18 +1650,18 @@
@@ -1352,18 +1652,18 @@
ip->ntflg = ntflag;
ntflag = op->ntflg;
(void) strncpy(ip->nti, ntin, 16);