diff options
author | Mike Frysinger <vapier@gentoo.org> | 2006-09-23 05:19:04 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2006-09-23 05:19:04 +0000 |
commit | 59c30f3fc77315541a417621bc7e070cbc7428ab (patch) | |
tree | 6cb608ad83a728fc70430aff00e2bf29954f0762 /net-firewall/iptables | |
parent | Remove ~alpha keyword. (diff) | |
download | gentoo-2-59c30f3fc77315541a417621bc7e070cbc7428ab.tar.gz gentoo-2-59c30f3fc77315541a417621bc7e070cbc7428ab.tar.bz2 gentoo-2-59c30f3fc77315541a417621bc7e070cbc7428ab.zip |
Fix silly segfault when using --log-prefix="" #148169 by tla.
(Portage version: 2.1.2_pre1)
Diffstat (limited to 'net-firewall/iptables')
3 files changed, 55 insertions, 4 deletions
diff --git a/net-firewall/iptables/ChangeLog b/net-firewall/iptables/ChangeLog index 25ac53aa93dd..a3300ecb18e0 100644 --- a/net-firewall/iptables/ChangeLog +++ b/net-firewall/iptables/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for net-firewall/iptables # Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-firewall/iptables/ChangeLog,v 1.108 2006/09/04 05:50:25 kumba Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-firewall/iptables/ChangeLog,v 1.109 2006/09/23 05:19:04 vapier Exp $ + + 23 Sep 2006; Mike Frysinger <vapier@gentoo.org> + +files/1.3.5-files/iptables-1.3.5-log-prefix-no-empty-strings.patch, + iptables-1.3.5-r4.ebuild: + Fix silly segfault when using --log-prefix="" #148169 by tla. 04 Sep 2006; Joshua Kinard <kumba@gentoo.org> iptables-1.3.5-r1.ebuild: Marked stable on mips. diff --git a/net-firewall/iptables/files/1.3.5-files/iptables-1.3.5-log-prefix-no-empty-strings.patch b/net-firewall/iptables/files/1.3.5-files/iptables-1.3.5-log-prefix-no-empty-strings.patch new file mode 100644 index 000000000000..cc397007292f --- /dev/null +++ b/net-firewall/iptables/files/1.3.5-files/iptables-1.3.5-log-prefix-no-empty-strings.patch @@ -0,0 +1,46 @@ +http://bugs.gentoo.org/148169 +https://bugzilla.netfilter.org/bugzilla/show_bug.cgi?id=516 + +--- extensions/libip6t_LOG.c ++++ extensions/libip6t_LOG.c +@@ -143,6 +143,10 @@ parse(int c, char **argv, int invert, un + "Maximum prefix length %u for --log-prefix", + (unsigned int)sizeof(loginfo->prefix) - 1); + ++ if (strlen(optarg) == 0) ++ exit_error(PARAMETER_PROBLEM, ++ "No prefix specified for --log-prefix"); ++ + if (strlen(optarg) != strlen(strtok(optarg, "\n"))) + exit_error(PARAMETER_PROBLEM, + "Newlines not allowed in --log-prefix"); +--- extensions/libipt_LOG.c ++++ extensions/libipt_LOG.c +@@ -143,6 +143,10 @@ parse(int c, char **argv, int invert, un + "Maximum prefix length %u for --log-prefix", + (unsigned int)sizeof(loginfo->prefix) - 1); + ++ if (strlen(optarg) == 0) ++ exit_error(PARAMETER_PROBLEM, ++ "No prefix specified for --log-prefix"); ++ + if (strlen(optarg) != strlen(strtok(optarg, "\n"))) + exit_error(PARAMETER_PROBLEM, + "Newlines not allowed in --log-prefix"); +--- extensions/libipt_ULOG.c ++++ extensions/libipt_ULOG.c +@@ -110,6 +110,14 @@ static int parse(int c, char **argv, int + "Maximum prefix length %u for --ulog-prefix", + (unsigned int)sizeof(loginfo->prefix) - 1); + ++ if (strlen(optarg) == 0) ++ exit_error(PARAMETER_PROBLEM, ++ "No prefix specified for --ulog-prefix"); ++ ++ if (strlen(optarg) != strlen(strtok(optarg, "\n"))) ++ exit_error(PARAMETER_PROBLEM, ++ "Newlines not allowed in --ulog-prefix"); ++ + strcpy(loginfo->prefix, optarg); + *flags |= IPT_LOG_OPT_PREFIX; + break; diff --git a/net-firewall/iptables/iptables-1.3.5-r4.ebuild b/net-firewall/iptables/iptables-1.3.5-r4.ebuild index 281bb166eab9..cbbc1c63ecf9 100644 --- a/net-firewall/iptables/iptables-1.3.5-r4.ebuild +++ b/net-firewall/iptables/iptables-1.3.5-r4.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-firewall/iptables/iptables-1.3.5-r4.ebuild,v 1.3 2006/08/05 23:54:42 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-firewall/iptables/iptables-1.3.5-r4.ebuild,v 1.4 2006/09/23 05:19:04 vapier Exp $ inherit eutils flag-o-matic toolchain-funcs linux-info @@ -70,8 +70,8 @@ src_unpack() { EPATCH_OPTS="-p1" \ epatch "${FILESDIR}"/1.3.1-files/${PN}-1.3.1-compilefix.patch - # bug #139726 - epatch "${FILESDIR}"/1.3.5-files/${P}-errno.patch + epatch "${FILESDIR}"/1.3.5-files/${P}-errno.patch #139726 + epatch "${FILESDIR}"/1.3.5-files/${P}-log-prefix-no-empty-strings.patch #148169 if use imq ; then EPATCH_OPTS="-p1" epatch "${DISTDIR}"/${IMQ_PATCH} |