From b02e09216838c95a46633cd8d09cf9134e79702d Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Jan 21 2005 13:34:06 +0000 Subject: - added patch telnetd-0.17-pty_read.patch, which fixes 145636 --- diff --git a/telnet.spec b/telnet.spec index caaa35c..74b77df 100644 --- a/telnet.spec +++ b/telnet.spec @@ -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 - 1:0.17-32 +- added patch telnetd-0.17-pty_read.patch, which fixes 145636 + * Thu Jan 13 2005 Jason Vas Dias - 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 diff --git a/telnetd-0.17-pty_read.patch b/telnetd-0.17-pty_read.patch new file mode 100644 index 0000000..1760ddd --- /dev/null +++ b/telnetd-0.17-pty_read.patch @@ -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