diff options
author | garga <garga@FreeBSD.org> | 2005-09-20 01:37:17 +0800 |
---|---|---|
committer | garga <garga@FreeBSD.org> | 2005-09-20 01:37:17 +0800 |
commit | 32109ebdd2a982a6667d2787eadb5cb3ec0e7fc5 (patch) | |
tree | 54e0de22c1b9842860b7e6f3b7a5308661025825 | |
parent | 6c3e140b431a019a84f0e7879eba4ee76759f1e2 (diff) | |
download | freebsd-ports-gnome-32109ebdd2a982a6667d2787eadb5cb3ec0e7fc5.tar.gz freebsd-ports-gnome-32109ebdd2a982a6667d2787eadb5cb3ec0e7fc5.tar.zst freebsd-ports-gnome-32109ebdd2a982a6667d2787eadb5cb3ec0e7fc5.zip |
- Fix build on >= 5.x
- Fix MASTER_SITES
- Patch for
http://www.freebsd.org/ports/portaudit/807b9ddd-dc11-11d8-9b0a-000347a4fa7d.html
(from debian project)
PR: ports/84695
Submitted by: Andrej Zverev <az@inec.ru>
Approved by: maintainer (timeout, 40 days)
Security: http://www.freebsd.org/ports/portaudit/807b9ddd-dc11-11d8-9b0a-000347a4fa7d.html
-rw-r--r-- | net/l2tpd/Makefile | 13 | ||||
-rw-r--r-- | net/l2tpd/files/patch-avp.c | 18 | ||||
-rw-r--r-- | net/l2tpd/files/patch-control.c | 22 | ||||
-rw-r--r-- | net/l2tpd/pkg-plist | 4 |
4 files changed, 36 insertions, 21 deletions
diff --git a/net/l2tpd/Makefile b/net/l2tpd/Makefile index 244cc9deead2..ecfe1acc70f8 100644 --- a/net/l2tpd/Makefile +++ b/net/l2tpd/Makefile @@ -7,9 +7,10 @@ PORTNAME= l2tpd PORTVERSION= 0.69 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= net -MASTER_SITES= http://www.l2tpd.org/downloads/ +MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} +MASTER_SITE_SUBDIR= ${PORTNAME} MAINTAINER= sobomax@FreeBSD.org COMMENT= An implementation of the layer two tunneling protocol @@ -21,10 +22,6 @@ MAN8= l2tpd.8 .include <bsd.port.pre.mk> -.if ${OSVERSION} >= 502126 -BROKEN= "Does not compile on FreeBSD >= 5.x" -.endif - do-configure: ${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/doc/l2tpd.8 \ ${WRKSRC}/doc/l2tpd.conf.sample ${WRKSRC}/doc/l2tp-secrets.5 \ @@ -32,8 +29,10 @@ do-configure: do-install: ${INSTALL_PROGRAM} ${WRKSRC}/l2tpd ${PREFIX}/bin +.if !defined(NOPORTDOCS) ${MKDIR} ${DOCSDIR} - ${INSTALL_MAN} ${WRKSRC}/README ${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR} +.endif ${INSTALL_MAN} ${WRKSRC}/doc/l2tpd.8 ${PREFIX}/man/man8 ${INSTALL_MAN} ${WRKSRC}/doc/l2tp-secrets.5 ${PREFIX}/man/man5 ${INSTALL_MAN} ${WRKSRC}/doc/l2tpd.conf.5 ${PREFIX}/man/man5 diff --git a/net/l2tpd/files/patch-avp.c b/net/l2tpd/files/patch-avp.c index ec8d1c93f245..ed288b18c84c 100644 --- a/net/l2tpd/files/patch-avp.c +++ b/net/l2tpd/files/patch-avp.c @@ -1,9 +1,6 @@ - -$FreeBSD$ - ---- avp.c 2002/10/22 09:41:27 1.1 -+++ avp.c 2002/10/22 09:43:02 -@@ -14,7 +14,6 @@ +--- avp.c.orig Mon Aug 19 19:39:27 2002 ++++ avp.c Tue Aug 9 12:29:34 2005 +@@ -15,7 +15,6 @@ #include <string.h> #include <stdio.h> #include <errno.h> @@ -11,3 +8,12 @@ $FreeBSD$ #include "l2tp.h" #define AVP_MAX 39 +@@ -1608,7 +1607,7 @@ + if (AMBIT (avp->length)) + { + log (LOG_WARN, +- "%s: dont know how to handle mandatory attribute %d. Closing %s.\n" ++ "%s: dont know how to handle mandatory attribute %d. Closing %s.\n", + __FUNCTION__, avp->attr, + (c != t->self) ? "call" : "tunnel"); + set_error (c, VENDOR_ERROR, diff --git a/net/l2tpd/files/patch-control.c b/net/l2tpd/files/patch-control.c index 92d4e18601a2..6e0b458d9baa 100644 --- a/net/l2tpd/files/patch-control.c +++ b/net/l2tpd/files/patch-control.c @@ -1,9 +1,6 @@ - -$FreeBSD$ - ---- control.c 2002/10/22 09:41:27 1.1 -+++ control.c 2002/10/22 09:43:24 -@@ -15,8 +15,6 @@ +--- control.c.orig.o Thu Apr 11 00:09:33 2002 ++++ control.c Tue Aug 9 13:20:07 2005 +@@ -16,8 +16,6 @@ #include <errno.h> #include <string.h> #include <stdio.h> @@ -12,3 +9,16 @@ $FreeBSD$ #include <unistd.h> #include <stdlib.h> #include "l2tp.h" +@@ -1582,6 +1580,12 @@ + wbuf[pos++] = e; + for (x = 0; x < buf->len; x++) + { ++ // we must at least still have 3 bytes left in the worst case scenario: ++ // 1 for a possible escape, 1 for the value and 1 to end the PPP stream. ++ if(pos >= (sizeof(wbuf) - 4)) { ++ return -EINVAL; ++ } ++ + e = *((char *) buf->start + x); + if ((e < 0x20) || (e == PPP_ESCAPE) || (e == PPP_FLAG)) + { diff --git a/net/l2tpd/pkg-plist b/net/l2tpd/pkg-plist index 17b1d761dae8..c5c429d7dc21 100644 --- a/net/l2tpd/pkg-plist +++ b/net/l2tpd/pkg-plist @@ -1,6 +1,6 @@ bin/l2tpd etc/l2tp/l2tp-secrets.sample etc/l2tp/l2tpd.conf.sample -share/doc/l2tpd/README -@dirrm share/doc/l2tpd +%%PORTDOCS%%%%DOCSDIR%%/README +%%PORTDOCS%%@dirrm %%DOCSDIR%% @dirrm etc/l2tp |