summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjarke Istrup Pedersen <gurligebis@gentoo.org>2009-05-22 12:25:02 +0000
committerBjarke Istrup Pedersen <gurligebis@gentoo.org>2009-05-22 12:25:02 +0000
commit0d8f6557c489959b95970b1e588090084d9bbd84 (patch)
tree1e32d45ecb48fb456ddc8aba977e8c248ae1c6fb /net-misc/miniupnpd
parentRemoving patch temporarily (diff)
downloadhistorical-0d8f6557c489959b95970b1e588090084d9bbd84.tar.gz
historical-0d8f6557c489959b95970b1e588090084d9bbd84.tar.bz2
historical-0d8f6557c489959b95970b1e588090084d9bbd84.zip
Fixing patch
Package-Manager: portage-2.2_rc33/cvs/Linux i686
Diffstat (limited to 'net-misc/miniupnpd')
-rw-r--r--net-misc/miniupnpd/ChangeLog6
-rw-r--r--net-misc/miniupnpd/files/miniupnpd-20090516.diff150
2 files changed, 155 insertions, 1 deletions
diff --git a/net-misc/miniupnpd/ChangeLog b/net-misc/miniupnpd/ChangeLog
index e5a70dd9a66e..5d1acfa54dc9 100644
--- a/net-misc/miniupnpd/ChangeLog
+++ b/net-misc/miniupnpd/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for net-misc/miniupnpd
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/miniupnpd/ChangeLog,v 1.9 2009/05/21 19:27:25 gurligebis Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/miniupnpd/ChangeLog,v 1.10 2009/05/22 12:25:01 gurligebis Exp $
+
+ 22 May 2009; Bjarke Istrup Pedersen <gurligebis@gentoo.org>
+ +files/miniupnpd-20090516.diff:
+ Fixing patch
*miniupnpd-1.3-r1 (21 May 2009)
diff --git a/net-misc/miniupnpd/files/miniupnpd-20090516.diff b/net-misc/miniupnpd/files/miniupnpd-20090516.diff
new file mode 100644
index 000000000000..1abcfb5cb959
--- /dev/null
+++ b/net-misc/miniupnpd/files/miniupnpd-20090516.diff
@@ -0,0 +1,150 @@
+diff -Naurp old/miniupnpd-1.3/Changelog.txt new/miniupnpd-1.3/Changelog.txt
+--- old/miniupnpd-1.3/Changelog.txt 2009-04-17 20:08:04.000000000 +0000
++++ new/miniupnpd-1.3/Changelog.txt 2009-05-16 08:45:19.000000000 +0000
+@@ -1,5 +1,12 @@
+-$Id: Changelog.txt,v 1.169 2009/04/17 19:58:38 nanard Exp $
++$Id: Changelog.txt,v 1.171 2009/05/16 08:44:15 nanard Exp $
+
++2009/05/16:
++ Fixed a buffer overflow in ProcessSSDPRequest()
++
++2009/05/11:
++ improving genconfig.sh for NetBSD : detecting use of pf or ipf
++
++VERSION 1.3 :
+ 2009/04/17:
+ working support for iptables >= 1.4.3
+
+diff -Naurp old/miniupnpd-1.3/genconfig.sh new/miniupnpd-1.3/genconfig.sh
+--- old/miniupnpd-1.3/genconfig.sh 2008-10-01 12:49:26.000000000 +0000
++++ new/miniupnpd-1.3/genconfig.sh 2009-05-16 08:45:19.000000000 +0000
+@@ -1,8 +1,8 @@
+ #! /bin/sh
+-# $Id: genconfig.sh,v 1.29 2008/10/01 11:19:38 nanard Exp $
++# $Id: genconfig.sh,v 1.31 2009/05/12 08:27:31 nanard Exp $
+ # miniupnp daemon
+ # http://miniupnp.free.fr or http://miniupnp.tuxfamily.org/
+-# (c) 2006-2008 Thomas Bernard
++# (c) 2006-2009 Thomas Bernard
+ # This software is subject to the conditions detailed in the
+ # LICENCE file provided within the distribution
+
+@@ -32,7 +32,7 @@ ${RM} ${CONFIGFILE}
+
+ echo "/* MiniUPnP Project" >> ${CONFIGFILE}
+ echo " * http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/" >> ${CONFIGFILE}
+-echo " * (c) 2006-2008 Thomas Bernard" >> ${CONFIGFILE}
++echo " * (c) 2006-2009 Thomas Bernard" >> ${CONFIGFILE}
+ echo " * generated by $0 on `date` */" >> ${CONFIGFILE}
+ echo "#ifndef $CONFIGMACRO" >> ${CONFIGFILE}
+ echo "#define $CONFIGMACRO" >> ${CONFIGFILE}
+@@ -95,14 +95,22 @@ case $OS_NAME in
+ OS_URL=http://www.pfsense.com/
+ ;;
+ NetBSD)
+- OS_URL=http://www.netbsd.org/
+- if [ -f /usr/include/net/pfvar.h ] ; then
++ # source file with handy subroutines like checkyesno
++ . /etc/rc.subr
++ # source config file so we can probe vars
++ . /etc/rc.conf
++ if checkyesno pf; then
+ echo "#define USE_PF 1" >> ${CONFIGFILE}
+ FW=pf
+- else
++ elif checkyesno ipfilter; then
+ echo "#define USE_IPF 1" >> ${CONFIGFILE}
+ FW=ipf
++ else
++ echo "Could not detect ipf nor pf, defaulting to pf."
++ echo "#define USE_PF 1" >> ${CONFIGFILE}
++ FW=pf
+ fi
++ OS_URL=http://www.netbsd.org/
+ ;;
+ SunOS)
+ echo "#define USE_IPF 1" >> ${CONFIGFILE}
+diff -Naurp old/miniupnpd-1.3/INSTALL new/miniupnpd-1.3/INSTALL
+--- old/miniupnpd-1.3/INSTALL 2009-04-10 08:56:54.000000000 +0000
++++ new/miniupnpd-1.3/INSTALL 2009-05-16 08:45:19.000000000 +0000
+@@ -61,6 +61,8 @@ To Build and install :
+ > make -f Makefile.linux
+ If not using iptables from your system,
+ > IPTABLESPATH=/path/to/iptables-1.4.1 make -f Makefile.linux
++ note : make sure you have iptables with static libraries compiled.
++ use "./configure --enable-static" before compiling iptables
+ - install as root using :
+ > make -f Makefile.linux install
+ - A miniupnpd script should be installed to /etc/init.d
+diff -Naurp old/miniupnpd-1.3/Makefile new/miniupnpd-1.3/Makefile
+--- old/miniupnpd-1.3/Makefile 2009-01-29 18:21:05.000000000 +0000
++++ new/miniupnpd-1.3/Makefile 2009-05-16 08:45:19.000000000 +0000
+@@ -1,4 +1,4 @@
+-# $Id: Makefile,v 1.49 2009/01/29 18:21:05 nanard Exp $
++# $Id: Makefile,v 1.50 2009/05/11 12:38:35 nanard Exp $
+ # MiniUPnP project
+ # http://miniupnp.free.fr/
+ # Author: Thomas Bernard
+@@ -30,6 +30,12 @@ FWNAME != . /etc/rc.subr; . /etc/rc.conf
+ echo "ipf"; else echo "pf"; fi
+ .endif
+
++.if $(OSNAME) == "NetBSD"
++FWNAME != . /etc/rc.subr; . /etc/rc.conf; \
++ if checkyesno ipfilter; then \
++ echo "ipf"; else echo "pf"; fi
++.endif
++
+ # Solaris specific CFLAGS
+ .if $(OSNAME) == "SunOS"
+ CFLAGS += -DSOLARIS2=`uname -r | cut -d. -f2`
+diff -Naurp old/miniupnpd-1.3/Makefile.linux new/miniupnpd-1.3/Makefile.linux
+--- old/miniupnpd-1.3/Makefile.linux 2009-04-17 20:08:04.000000000 +0000
++++ new/miniupnpd-1.3/Makefile.linux 2009-05-16 08:45:19.000000000 +0000
+@@ -1,4 +1,4 @@
+-# $Id: Makefile.linux,v 1.45 2009/04/17 19:58:38 nanard Exp $
++# $Id: Makefile.linux,v 1.46 2009/04/25 23:16:38 nanard Exp $
+ # MiniUPnP project
+ # http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
+ # Author : Thomas Bernard
+@@ -53,7 +53,8 @@ TEST := $(shell [ \( \( $(IPTABLESVERSIO
+ ifeq ($(TEST), 1)
+ CFLAGS := $(CFLAGS) -DIPTABLES_143
+ # the following sucks, but works
+-LIBS = $(IPTABLESPATH)/libiptc/.libs/libip4tc.o
++#LIBS = $(IPTABLESPATH)/libiptc/.libs/libip4tc.o
++LIBS = $(IPTABLESPATH)/libiptc/.libs/libiptc.a
+ else
+ LIBS = $(IPTABLESPATH)/libiptc/libiptc.a
+ endif
+diff -Naurp old/miniupnpd-1.3/minissdp.c new/miniupnpd-1.3/minissdp.c
+--- old/miniupnpd-1.3/minissdp.c 2008-11-24 09:48:07.000000000 +0000
++++ new/miniupnpd-1.3/minissdp.c 2009-05-16 08:45:19.000000000 +0000
+@@ -1,4 +1,4 @@
+-/* $Id: minissdp.c,v 1.15 2008/11/24 09:48:00 nanard Exp $ */
++/* $Id: minissdp.c,v 1.16 2009/05/16 08:44:16 nanard Exp $ */
+ /* MiniUPnP project
+ * http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
+ * (c) 2006 Thomas Bernard
+@@ -331,10 +331,10 @@ ProcessSSDPRequest(int s, unsigned short
+ i = 0;
+ while(i < n)
+ {
+- while(bufr[i] != '\r' || bufr[i+1] != '\n')
++ while((i < n - 1) && (bufr[i] != '\r' || bufr[i+1] != '\n'))
+ i++;
+ i += 2;
+- if(strncasecmp(bufr+i, "st:", 3) == 0)
++ if((i < n - 3) && (strncasecmp(bufr+i, "st:", 3) == 0))
+ {
+ st = bufr+i+3;
+ st_len = 0;
+@@ -352,7 +352,7 @@ ProcessSSDPRequest(int s, unsigned short
+ /*syslog(LOG_INFO, "SSDP M-SEARCH packet received from %s:%d",
+ inet_ntoa(sendername.sin_addr),
+ ntohs(sendername.sin_port) );*/
+- if(st)
++ if(st && (st_len > 0))
+ {
+ /* TODO : doesnt answer at once but wait for a random time */
+ syslog(LOG_INFO, "SSDP M-SEARCH from %s:%d ST: %.*s",