rpms/tcp_wrappers/FC-5 tcp_wrappers-7.6-restore_sigalarm.patch, NONE, 1.1 tcp_wrappers-7.6-siglongjmp.patch, NONE, 1.1 tcp_wrappers.spec, 1.20, 1.21

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Wed Apr 18 13:40:39 UTC 2007


Author: tjanouse

Update of /cvs/dist/rpms/tcp_wrappers/FC-5
In directory cvs.devel.redhat.com:/tmp/cvs-serv2958

Modified Files:
	tcp_wrappers.spec 
Added Files:
	tcp_wrappers-7.6-restore_sigalarm.patch 
	tcp_wrappers-7.6-siglongjmp.patch 
Log Message:
* Wed Apr 18 2007 Tomas Janousek <tjanouse at redhat.com> - 7.6-40.3
- added restore_sigalarm and siglongjmp patches from Debian, fixes #205129


tcp_wrappers-7.6-restore_sigalarm.patch:
 rfc931.c |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletion(-)

--- NEW FILE tcp_wrappers-7.6-restore_sigalarm.patch ---
diff -ruN tcp_wrappers_7.6.orig/rfc931.c tcp_wrappers_7.6/rfc931.c
--- tcp_wrappers_7.6.orig/rfc931.c	2004-08-29 18:40:08.000000000 +0200
+++ tcp_wrappers_7.6/rfc931.c	2004-08-29 18:40:02.000000000 +0200
@@ -92,6 +92,8 @@
     char   *cp;
     char   *result = unknown;
     FILE   *fp;
+    unsigned saved_timeout;
+    struct sigaction nact, oact;
 
 #ifdef INET6
     /* address family must be the same */
@@ -134,7 +136,12 @@
 	 */
 
 	if (setjmp(timebuf) == 0) {
-	    signal(SIGALRM, timeout);
+	    /* Save SIGALRM timer and handler. Sudheer Abdul-Salam, SUN. */
+	    saved_timeout = alarm(0);
+	    nact.sa_handler = timeout;
+	    nact.sa_flags = 0;
+	    (void) sigemptyset(&nact.sa_mask);
+	    (void) sigaction(SIGALRM, &nact, &oact);
 	    alarm(rfc931_timeout);
 
 	    /*
@@ -223,6 +230,10 @@
 	    }
 	    alarm(0);
 	}
+	/* Restore SIGALRM timer and handler. Sudheer Abdul-Salam, SUN. */
+	(void) sigaction(SIGALRM, &oact, NULL);
+	if (saved_timeout > 0)
+	    alarm(saved_timeout);
 	fclose(fp);
     }
     STRN_CPY(dest, result, STRING_LENGTH);

tcp_wrappers-7.6-siglongjmp.patch:
 rfc931.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

--- NEW FILE tcp_wrappers-7.6-siglongjmp.patch ---
diff -ruNp tcp_wrappers_7.6.orig/rfc931.c tcp_wrappers_7.6/rfc931.c
--- tcp_wrappers_7.6.orig/rfc931.c	2004-08-29 18:42:25.000000000 +0200
+++ tcp_wrappers_7.6/rfc931.c	2004-08-29 18:41:04.000000000 +0200
@@ -33,7 +33,7 @@ static char sccsid[] = "@(#) rfc931.c 1.
 
 int     rfc931_timeout = RFC931_TIMEOUT;/* Global so it can be changed */
 
-static jmp_buf timebuf;
+static sigjmp_buf timebuf;
 
 /* fsocket - open stdio stream on top of socket */
 
@@ -62,7 +62,7 @@ int     protocol;
 static void timeout(sig)
 int     sig;
 {
-    longjmp(timebuf, sig);
+    siglongjmp(timebuf, sig);
 }
 
 /* rfc931 - return remote user name, given socket structures */
@@ -135,7 +135,7 @@ char   *dest;
 	 * Set up a timer so we won't get stuck while waiting for the server.
 	 */
 
-	if (setjmp(timebuf) == 0) {
+	if (sigsetjmp(timebuf, 1) == 0) {
 	    /* Save SIGALRM timer and handler. Sudheer Abdul-Salam, SUN. */
 	    saved_timeout = alarm(0);
 	    nact.sa_handler = timeout;


Index: tcp_wrappers.spec
===================================================================
RCS file: /cvs/dist/rpms/tcp_wrappers/FC-5/tcp_wrappers.spec,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- tcp_wrappers.spec	5 Mar 2007 16:10:35 -0000	1.20
+++ tcp_wrappers.spec	18 Apr 2007 13:40:32 -0000	1.21
@@ -1,7 +1,7 @@
 Summary: A security tool which acts as a wrapper for TCP daemons.
 Name: tcp_wrappers
 Version: 7.6
-Release: 40.2%{?dist}
+Release: 40.3%{?dist}
 
 %define LIB_MAJOR 0
 %define LIB_MINOR 7
@@ -27,6 +27,8 @@
 Patch14: tcp_wrappers-7.6-ldflags.patch
 Patch15: tcp_wrappers-7.6-fix_sig-bug141110.patch
 Patch16: tcp_wrappers-7.6-162412.patch
+Patch17: tcp_wrappers-7.6-restore_sigalarm.patch
+Patch18: tcp_wrappers-7.6-siglongjmp.patch
 # required by sin_scope_id in ipv6 patch
 BuildPreReq: glibc-devel >= 2.2		
 BuildRoot: %{_tmppath}/%{name}-root
@@ -59,6 +61,8 @@
 %patch14 -p1 -b .cflags
 %patch15 -p1 -b .fix_sig
 %patch16 -p1 -b .162412
+%patch17 -p1 -b .restore_sigalarm
+%patch18 -p1 -b .siglongjmp
 
 %build
 make RPM_OPT_FLAGS="$RPM_OPT_FLAGS -fPIC -DPIC -D_REENTRANT -DHAVE_STRERROR" LDFLAGS="-pie" MAJOR=%{LIB_MAJOR} MINOR=%{LIB_MINOR} REL=%{LIB_REL} linux
@@ -106,6 +110,9 @@
 %{_sbindir}/*
 
 %changelog
+* Wed Apr 18 2007 Tomas Janousek <tjanouse at redhat.com> - 7.6-40.3
+- added restore_sigalarm and siglongjmp patches from Debian, fixes #205129
+
 * Fri Feb 10 2006 Jesse Keating <jkeating at redhat.com> - 7.6-40.2
 - bump again for double-long bug on ppc(64)
 




More information about the fedora-cvs-commits mailing list