rpms/aiccu/EL-4 aiccu-cloexec.patch, NONE, 1.1 aiccu-lsb-initscript.patch, NONE, 1.1 aiccu.spec, 1.7, 1.8

Matt Domsch mdomsch at fedoraproject.org
Sun Nov 2 05:11:10 UTC 2008


Author: mdomsch

Update of /cvs/extras/rpms/aiccu/EL-4
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv9935

Modified Files:
	aiccu.spec 
Added Files:
	aiccu-cloexec.patch aiccu-lsb-initscript.patch 
Log Message:
add initscript cleanups and cloexec patch

aiccu-cloexec.patch:

--- NEW FILE aiccu-cloexec.patch ---
diff -urNp --exclude-from=/home/mdomsch/excludes --minimal aiccu.orig/common/common.c aiccu/common/common.c
--- aiccu.orig/common/common.c	2008-10-17 18:43:13.000000000 -0500
+++ aiccu/common/common.c	2008-10-17 22:11:52.000000000 -0500
@@ -365,6 +365,7 @@ TLSSOCKET connect_client(const char *hos
 	{
 		sock->socket = socket(res->ai_family, res->ai_socktype, res->ai_protocol);
 		if (sock->socket == -1) continue;
+		fcntl(sock->socket, F_SETFD, FD_CLOEXEC);
 		if (connect(sock->socket, res->ai_addr, (unsigned int)res->ai_addrlen) == 0) break;
 		closesocket(sock->socket);
 		sock->socket = -1;
@@ -428,6 +429,7 @@ TLSSOCKET listen_server(const char *desc
 		sock->socket = socket(res->ai_family, res->ai_socktype, res->ai_protocol);
 		if (!(sock->socket < 0))
 		{
+			fcntl(sock->socket, F_SETFD, FD_CLOEXEC);
 			setsockopt(sock->socket, SOL_SOCKET, SO_REUSEADDR, (const char *)&on, sizeof(on));
 			if (bind(sock->socket, res->ai_addr, (unsigned int)res->ai_addrlen) == 0) break;
 			closesocket(sock->socket);
diff -urNp --exclude-from=/home/mdomsch/excludes --minimal aiccu.orig/common/heartbeat.c aiccu/common/heartbeat.c
--- aiccu.orig/common/heartbeat.c	2008-10-17 18:43:13.000000000 -0500
+++ aiccu/common/heartbeat.c	2008-10-17 22:12:51.000000000 -0500
@@ -58,6 +58,7 @@ SOCKET heartbeat_socket(
 		dolog(LOG_ERR, "Couldn't open a socket for determining current IPv4 address\n");
 		return -1;
 	}
+	fcntl(sockfd, F_SETFD, FD_CLOEXEC);
 
 #if defined(SOL_SOCKET) && defined(SO_BINDTODEVICE)
 	/*
diff -urNp --exclude-from=/home/mdomsch/excludes --minimal aiccu.orig/common/tun.c aiccu/common/tun.c
--- aiccu.orig/common/tun.c	2008-10-17 18:43:13.000000000 -0500
+++ aiccu/common/tun.c	2008-10-17 22:12:42.000000000 -0500
@@ -696,6 +696,8 @@ bool tun_start(struct tun_reader *tun)
 
 	/* Create a new tap device */
 	tun_fd = open("/dev/net/tun", O_RDWR);
+	if (tun_fd >= 0)
+		fcntl(tun_fd, F_SETFD, FD_CLOEXEC);
 	if (tun_fd == -1)
 	{
 		tun_log(LOG_ERR, "start", "Couldn't open device %s: %s (%d)\n", "/dev/net/tun", strerror(errno), errno);
@@ -725,6 +727,8 @@ bool tun_start(struct tun_reader *tun)
 	tun_log(LOG_DEBUG, "start", "Trying Configured TUN/TAP interface %s...\n", g_aiccu->ipv6_interface);
 	snprintf(buf, sizeof(buf), "/dev/%s", g_aiccu->ipv6_interface);
 	tun_fd = open(buf, O_RDWR);
+	if (tun_fd >= 0)
+		fcntl(tun_fd, F_SETFD, FD_CLOEXEC);
 	if (tun_fd < 0)
 	{
 		/* Fall back to trying all /dev/tun* devices */
@@ -735,6 +739,7 @@ bool tun_start(struct tun_reader *tun)
 			tun_fd = open(buf, O_RDWR);
 			if (tun_fd >= 0)
 			{
+				fcntl(tun_fd, F_SETFD, FD_CLOEXEC);
 				/* Copy over the name of the interface so that configging goes okay */
 				if (g_aiccu->ipv6_interface) free(g_aiccu->ipv6_interface);
 				snprintf(buf, sizeof(buf), "tun%u", i);

aiccu-lsb-initscript.patch:

--- NEW FILE aiccu-lsb-initscript.patch ---
--- aiccu/doc/aiccu.init.rpm.orig	2007-09-21 21:15:04.000000000 -0500
+++ aiccu/doc/aiccu.init.rpm	2007-09-21 21:19:19.000000000 -0500
@@ -8,6 +8,20 @@
 # config:  /etc/aiccu.conf
 # chkconfig: - 59 73
 # processname: aiccu
+#
+### BEGIN INIT INFO
+# Provides: aiccu
+# Required-Start: $local_fs $remote_fs $network $time $named
+# Required-Stop: $local_fs $remote_fs $network $time $named
+# Default-Start:
+# Default-Stop:
+# Short-Description: hearbeat daemon for IPv6-in-IPv4 (Proto-41, AYIYA, Heartbeat) tunnels
+# Description:  aiccu automatically gives one IPv6 connectivity
+#   without having to manually configure interfaces etc.
+#   One does need a SixXS account and at least a tunnel. These
+#   can be freely & gratis requested from the SixXS website.
+#   For more information about SixXS check http://www.sixxs.net
+### END INIT INFO
 
 # Source function library.
 if [ -f /etc/init.d/functions ] ; then
@@ -90,6 +104,9 @@
   reload)
   	restart
 	;;
+  force-reload)
+	restart
+	;;
   status)
   	rhstatus
 	;;


Index: aiccu.spec
===================================================================
RCS file: /cvs/extras/rpms/aiccu/EL-4/aiccu.spec,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- aiccu.spec	25 Feb 2007 04:02:43 -0000	1.7
+++ aiccu.spec	2 Nov 2008 05:10:40 -0000	1.8
@@ -9,12 +9,14 @@
 Summary:   AICCU - SixXS Automatic IPv6 Connectivity Client Utility
 Name:      aiccu
 Version:   2007.01.15
-Release:   1%{?dist}
+Release:   5%{?dist}
 License:   BSD
 Group:     System Environment/Daemons
 URL:       http://www.sixxs.net/tools/aiccu/
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 Source:    http://www.sixxs.net/archive/sixxs/aiccu/unix/aiccu_20070115.tar.gz
+Patch0: aiccu-lsb-initscript.patch
+Patch1: aiccu-cloexec.patch
 BuildRequires: gnutls-devel
 Requires:  iproute
 Requires(post): chkconfig
@@ -30,6 +32,9 @@
 
 %prep
 %setup -q -n %{name}
+%patch0 -p1
+%patch1 -p1
+
 # fix executable permissions on non-executable content
 # so debuginfo can pick them up properly
 find . -type f -not -name rules -and -not -name *init* -exec chmod a-x \{\} \;
@@ -70,6 +75,18 @@
 %{_sysconfdir}/init.d/aiccu
 
 %changelog
+* Fri Oct 17 2008 Matt Domsch <mdomsch at fedoraproject.org> - 2007.01.15-5
+- close file descriptors on exec (BZ#467381)
+
+* Tue Jun 24 2008 Tomas Mraz <tmraz at redhat.com> 2007.01.15-4 
+- rebuild with new gnutls
+
+* Fri Sep 21 2007 Matt Domsch <matt at domsch.com> 2007.01.15-3
+- add LSB initscript header (BZ#246861)
+
+* Wed Sep 19 2007 Matt Domsch <matt at domsch.com> 2007.01.15-2
+- rebuild
+
 * Wed Jan 31 2007 Matt Domsch <matt at domsch.com> 2007.01.15-1
 - upgrade to latest upstream
 




More information about the fedora-extras-commits mailing list