- added patch telnetd-0.17-pty_read.patch, which fixes 145636

This commit is contained in:
Harald Hoyer 2005-01-21 13:34:06 +00:00
parent 3d6bab6b7c
commit b02e092168
2 changed files with 30 additions and 0 deletions

View File

@ -20,6 +20,7 @@ Patch11: telnet-0.17-8bit.patch
Patch12: telnet-0.17-argv.patch
Patch13: telnet-0.17-conf.patch
Patch14: telnet-0.17-cleanup_race.patch
Patch15: telnetd-0.17-pty_read.patch
BuildPreReq: ncurses-devel
Buildroot: %{_tmppath}/%{name}-root
@ -56,6 +57,7 @@ mv telnet telnet-NETKIT
%patch12 -p1 -b .argv
%patch13 -p1 -b .confverb
%patch14 -p1 -b .cleanup_race
%patch15 -p0 -b .pty_read
%build
export OPT_FLAGS="$RPM_OPT_FLAGS -g"
@ -121,6 +123,9 @@ rm -rf ${RPM_BUILD_ROOT}
%{_mandir}/man8/telnetd.8*
%changelog
* Fri Jan 21 2005 Harald Hoyer <harald@redhat.com> - 1:0.17-32
- added patch telnetd-0.17-pty_read.patch, which fixes 145636
* Thu Jan 13 2005 Jason Vas Dias <jvdias@redhat.com> - 1:0.17-31
- bug 143929 / 145004 : fix race condition in telnetd on wtmp lock
- when cleanup() is entered from main process and in signal

View File

@ -0,0 +1,25 @@
--- telnetd/telnetd.c 2005-01-19 14:37:25.000000000 +0000
+++ telnetd/telnetd.c.new 2005-01-19 14:48:12.000000000 +0000
@@ -697,6 +697,7 @@
int on = 1;
char *HE;
const char *IM;
+ int pty_read_ok = 0; /* track whether the pty read has worked yet */
/*
* Initialize the slc mapping table.
@@ -1016,12 +1017,13 @@
* off the master side before the slave side is
* opened, we get EIO.
*/
- if (pcc < 0 && (errno == EWOULDBLOCK || errno == EIO)) {
+ if (pcc < 0 && (errno == EWOULDBLOCK || (errno == EIO && pty_read_ok == 0))) {
pcc = 0;
}
else {
if (pcc <= 0)
break;
+ pty_read_ok = 1; /* mark connection up for read */
#ifdef LINEMODE
/*
* If ioctl from pty, pass it through net