rpms/ulogd/devel ulogd-1.24-fortify-source.patch, NONE, 1.1 ulogd-1.02-init.patch, 1.3, 1.4 ulogd.spec, 1.16, 1.17

Aurelien Bompard (abompard) fedora-extras-commits at redhat.com
Tue Aug 14 08:51:35 UTC 2007


Author: abompard

Update of /cvs/pkgs/rpms/ulogd/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv11480

Modified Files:
	ulogd-1.02-init.patch ulogd.spec 
Added Files:
	ulogd-1.24-fortify-source.patch 
Log Message:
* Sat Jul 14 2007 Aurelien Bompard <abompard at fedoraproject.org> 1.24-4
- add patch to fix bug 247345
- update URL
- fix initscript (bug 247083)
- unmark init script as %config (Fedora policy)


ulogd-1.24-fortify-source.patch:

--- NEW FILE ulogd-1.24-fortify-source.patch ---
--- extensions/ulogd_BASE.c.fortify-source	2007-08-06 11:23:53.000000000 +0200
+++ extensions/ulogd_BASE.c	2007-08-06 11:28:47.000000000 +0200
@@ -63,7 +63,7 @@ static ulog_iret_t *_interp_raw(ulog_int
 {
 	unsigned char *p;
 	int i;
-	char *buf, *oldbuf = NULL;
+	char *buf = NULL;
 	ulog_iret_t *ret = ip->result;
 
 	if (pkt->mac_len) {
@@ -75,9 +75,8 @@ static ulog_iret_t *_interp_raw(ulog_int
 		*buf = '\0';
 
 		p = pkt->mac;
-		oldbuf = buf;
 		for (i = 0; i < pkt->mac_len; i++, p++)
-			sprintf(buf, "%s%02x%c", oldbuf, *p, i==pkt->mac_len-1 ? ' ':':');
+			sprintf(buf + (i*3), "%02x%c", *p, i==pkt->mac_len-1 ? ' ':':');
 		ret[0].value.ptr = buf;
 		ret[0].flags |= ULOGD_RETF_VALID;
 	}

ulogd-1.02-init.patch:

Index: ulogd-1.02-init.patch
===================================================================
RCS file: /cvs/pkgs/rpms/ulogd/devel/ulogd-1.02-init.patch,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ulogd-1.02-init.patch	21 Feb 2006 19:05:44 -0000	1.3
+++ ulogd-1.02-init.patch	14 Aug 2007 08:51:32 -0000	1.4
@@ -1,17 +1,29 @@
---- ./ulogd.init.fedora	2004-03-23 23:36:12.000000000 +0100
-+++ ./ulogd.init	2005-11-13 18:52:09.000000000 +0100
-@@ -1,16 +1,23 @@
+--- ./ulogd.init.lsbinit	2005-11-25 20:58:27.000000000 +0100
++++ ./ulogd.init	2007-07-14 10:25:22.000000000 +0200
+@@ -1,36 +1,66 @@
  #!/bin/sh
  #
 -# chkconfig: 345 81 19
 +# chkconfig: - 81 19
  # description: ulogd is the userspace logging daemon for netfilter/iptables
++### BEGIN INIT INFO
++# Provides: ulogd
++# Required-Start: $local_fs $network $remote_fs
++# Should-Start: $syslog
++# Required-Stop: $local_fs $network $remote_fs
++# Should-Stop: $syslog
++# Default-Start: 
++# Default-Stop: 0 1 6
++# Short-Description: start and stop ulogd
++# Description: ulogd is the userspace logging daemon for netfilter/iptables
++### END INIT INFO
  #
  
  
  . /etc/rc.d/init.d/functions
  
 +prog="ulogd"
++test -x /usr/sbin/ulogd || exit 0
 +
 +# Source networking configuration.
 +. /etc/sysconfig/network
@@ -22,28 +34,69 @@
  function start()
  {
 -	printf "Starting %s: " "ulogd"
-+	echo -n $"Starting $prog: "
- 	daemon /usr/sbin/ulogd -d
- 	echo
- 	touch /var/lock/subsys/ulogd
-@@ -19,7 +26,7 @@
+-	daemon /usr/sbin/ulogd -d
+-	echo
+-	touch /var/lock/subsys/ulogd
++	pid=`pidof ulogd`
++	if [ "x$pid" == "x" ]; then
++		echo -n $"Starting $prog: "
++		daemon /usr/sbin/ulogd -d || exit $?
++		echo
++		touch /var/lock/subsys/ulogd
++	else
++		echo $"$prog is already running."
++	fi
+ }
+ 
  
  function stop()
  {
 -	printf "Stopping %s: " "ulogd"
-+	echo -n $"Stopping $prog: "
- 	killproc ulogd
- 	echo
- 	rm -f /var/lock/subsys/ulogd
-@@ -28,6 +35,7 @@
+-	killproc ulogd
+-	echo
+-	rm -f /var/lock/subsys/ulogd
++	pid=`pidof ulogd`
++	if [ "x$pid" != "x" ]; then
++		echo -n $"Stopping $prog: "
++		killproc ulogd || exit $?
++		echo
++		rm -f /var/lock/subsys/ulogd
++	else
++		echo $"$prog is already stopped."
++	fi
+ }
+ 
  
  function reload()
  {
-+    echo -n $"Reloading $prog: "
++	echo -n $"Reloading $prog: "
  	pid=`pidof ulogd`
  	if [ "x$pid" != "x" ]; then
- 		kill -HUP $pid 2>/dev/null
-@@ -54,8 +62,8 @@
+-		kill -HUP $pid 2>/dev/null
++		kill -HUP $pid 2>/dev/null || exit $?
+ 	fi
+ 	touch /var/lock/subsys/ulogd
+ }
+@@ -44,18 +74,26 @@ case "$1" in
+   	stop
+ 	;;
+   restart)
++	echo $"restarting $prog..."
+ 	stop
+ 	start
+ 	;;
+-  reload)
++  try-restart|condrestart)
++	pid=`pidof ulogd`
++	if [ "x$pid" != "x" ]; then
++		stop
++		start
++	fi
++	;;
++  reload|force-reload)
+ 	reload
+ 	;;
+   status)
  	status ulogd
  	;;
    *)


Index: ulogd.spec
===================================================================
RCS file: /cvs/pkgs/rpms/ulogd/devel/ulogd.spec,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- ulogd.spec	9 Dec 2006 16:00:39 -0000	1.16
+++ ulogd.spec	14 Aug 2007 08:51:32 -0000	1.17
@@ -1,15 +1,17 @@
 Name:           ulogd
 Version:        1.24
-Release:        3%{?dist}
+Release:        4%{?dist}
 Summary:        The userspace logging daemon for netfilter
 License:        GPL
 Group:          System Environment/Daemons
-URL:            http://gnumonks.org/projects/ulogd
+URL:            http://gnumonks.org/projects
 Source0:        http://ftp.netfilter.org/pub/ulogd/ulogd-%{version}.tar.bz2
 Source1:        ulogd.logrotate
 Source2:        ulogd.8
 Patch1:         ulogd-1.21-logdir.patch
 Patch2:         ulogd-1.02-init.patch
+# Bug 247345
+Patch3:         ulogd-1.24-fortify-source.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 Requires(post):	initscripts, chkconfig
 Requires(postun): initscripts, chkconfig
@@ -44,7 +46,8 @@
 %prep
 %setup -q
 %patch1 -p1 -b .logdir
-%patch2 -p1 -b .fedora
+%patch2 -p1 -b .lsbinit
+%patch3 -p0 -b .fortify-source
 
 %build
 %configure --with-mysql --with-pgsql
@@ -96,7 +99,7 @@
 %doc doc/mysql.table* doc/pgsql.table
 %{_sbindir}/ulogd
 %config(noreplace) %{_sysconfdir}/ulogd.conf
-%config(noreplace) %{_sysconfdir}/rc.d/init.d/ulogd
+%{_sysconfdir}/rc.d/init.d/ulogd
 %{_libdir}/ulogd
 %dir %{_localstatedir}/log/ulogd
 %config(noreplace) %{_sysconfdir}/logrotate.d/ulogd
@@ -113,6 +116,12 @@
 %{_libdir}/ulogd/ulogd_PGSQL.so
 
 %changelog
+* Sat Jul 14 2007 Aurelien Bompard <abompard at fedoraproject.org> 1.24-4
+- add patch to fix bug 247345
+- update URL
+- fix initscript (bug 247083)
+- unmark init script as %%config (Fedora policy)
+
 * Sat Dec 09 2006 Aurelien Bompard <abompard at fedoraproject.org> 1.24-3
 - rebuild
 




More information about the fedora-extras-commits mailing list