diff --git a/telnet-rh678324.patch b/telnet-rh678324.patch new file mode 100644 index 0000000..d3cfbe9 --- /dev/null +++ b/telnet-rh678324.patch @@ -0,0 +1,21 @@ +diff -up netkit-telnet-0.17/telnetd/telnetd.c.rh678324 netkit-telnet-0.17/telnetd/telnetd.c +--- netkit-telnet-0.17/telnetd/telnetd.c.rh678324 2011-06-28 14:51:09.996726296 +0200 ++++ netkit-telnet-0.17/telnetd/telnetd.c 2011-06-28 14:52:38.212726283 +0200 +@@ -92,7 +92,7 @@ extern void usage(void); + int + main(int argc, char *argv[], char *env[]) + { +- struct sockaddr from; ++ struct sockaddr_storage from; + int on = 1; + socklen_t fromlen; + register int ch; +@@ -344,7 +344,7 @@ main(int argc, char *argv[], char *env[] + + openlog("telnetd", LOG_PID | LOG_ODELAY, LOG_DAEMON); + fromlen = sizeof (from); +- if (getpeername(s, &from, &fromlen) < 0) { ++ if (getpeername(s, (struct sockaddr *)&from, &fromlen) < 0) { + fprintf(stderr, "%s: ", progname); + perror("getpeername"); + _exit(1); diff --git a/telnet.spec b/telnet.spec index ea99420..6b28701 100644 --- a/telnet.spec +++ b/telnet.spec @@ -1,7 +1,7 @@ Summary: The client program for the Telnet remote login protocol Name: telnet Version: 0.17 -Release: 49%{?dist} +Release: 50%{?dist} Epoch: 1 License: BSD Group: Applications/Internet @@ -27,6 +27,7 @@ Patch19: netkit-telnet-0.17-ipv6.diff Patch20: netkit-telnet-0.17-nodns.patch Patch21: telnet-0.17-errno_test_sys_bsd.patch Patch22: netkit-telnet-0.17-reallynodns.patch +Patch23: telnet-rh678324.patch BuildRequires: ncurses-devel Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -70,6 +71,7 @@ mv telnet telnet-NETKIT %patch20 -p1 -b .nodns %patch21 -p1 -b .errnosysbsd %patch22 -p1 -b .reallynodns +%patch23 -p1 -b .rh678324 %build %ifarch s390 s390x @@ -129,6 +131,9 @@ rm -rf ${RPM_BUILD_ROOT} %{_mandir}/man8/telnetd.8* %changelog +* Tue Jun 28 2011 Adam Tkac 1:0.17-50 +- telnetd: store "from" address in sockaddr_storage (#678324) + * Wed Feb 09 2011 Fedora Release Engineering - 1:0.17-49 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild