[telnet] Update /var/run/utmp even on some corner cases

Adam Tkac atkac at fedoraproject.org
Thu Jun 14 12:09:07 UTC 2012


commit e11790a9194108063f677b49e28d29d65ede550e
Author: Adam Tkac <atkac at redhat.com>
Date:   Thu Jun 14 14:06:56 2012 +0200

    Update /var/run/utmp even on some corner cases
    
    Signed-off-by: Adam Tkac <atkac at redhat.com>

 telnet-rh825946.patch |   25 +++++++++++++++++++++++++
 telnet.spec           |    7 ++++++-
 2 files changed, 31 insertions(+), 1 deletions(-)
---
diff --git a/telnet-rh825946.patch b/telnet-rh825946.patch
new file mode 100644
index 0000000..250ba7c
--- /dev/null
+++ b/telnet-rh825946.patch
@@ -0,0 +1,25 @@
+diff -up netkit-telnet-0.17/telnetd/sys_term.c.rh825946 netkit-telnet-0.17/telnetd/sys_term.c
+--- netkit-telnet-0.17/telnetd/sys_term.c.rh825946	1999-12-17 15:28:47.000000000 +0100
++++ netkit-telnet-0.17/telnetd/sys_term.c	2012-06-14 14:05:30.538342755 +0200
+@@ -723,6 +723,9 @@ void cleanup(int sig) {
+     char *p;
+     (void)sig;
+ 
++    /* to avoid a race for wtmp lock */
++    signal(SIGCHLD, SIG_IGN);
++
+     p = line + sizeof("/dev/") - 1;
+     if (logout(p)) logwtmp(p, "", "");
+ #ifdef PARANOID_TTYS
+diff -up netkit-telnet-0.17/telnetd/telnetd.c.rh825946 netkit-telnet-0.17/telnetd/telnetd.c
+--- netkit-telnet-0.17/telnetd/telnetd.c.rh825946	2012-06-14 14:04:42.000000000 +0200
++++ netkit-telnet-0.17/telnetd/telnetd.c	2012-06-14 14:06:01.547291404 +0200
+@@ -1147,8 +1147,6 @@ void telnet(int f, int p)
+ 	if (FD_ISSET(p, &obits) && (pfrontp - pbackp) > 0)
+ 	    ptyflush();
+     }
+-    /* to avoid a race for wtmp lock */
+-    signal(SIGCHLD, SIG_IGN);
+     cleanup(0);
+ }  /* end of telnet */
+ 	
diff --git a/telnet.spec b/telnet.spec
index 437e2e3..5e906af 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: 52%{?dist}
+Release: 53%{?dist}
 Epoch: 1
 License: BSD
 Group: Applications/Internet
@@ -31,6 +31,7 @@ Patch22: netkit-telnet-0.17-reallynodns.patch
 Patch23: telnet-rh678324.patch
 Patch24: telnet-rh674942.patch
 Patch25: telnet-rh704604.patch
+Patch26: telnet-rh825946.patch
 
 BuildRequires: ncurses-devel
 Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -77,6 +78,7 @@ mv telnet telnet-NETKIT
 %patch23 -p1 -b .rh678324
 %patch24 -p1 -b .rh674942
 %patch25 -p1 -b .rh704604
+%patch26 -p1 -b .rh825946
 
 %build
 %ifarch s390 s390x
@@ -136,6 +138,9 @@ rm -rf ${RPM_BUILD_ROOT}
 %{_mandir}/man8/telnetd.8*
 
 %changelog
+* Thu Jun 14 2012 Adam Tkac <atkac redhat com> 1:0.17-53
+- update /var/run/utmp even on some corner cases
+
 * Sat Jan 14 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1:0.17-52
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
 


More information about the scm-commits mailing list