Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Nov 2013 23:37:05 +0000 (UTC)
From:      Brooks Davis <brooks@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r334544 - in head/net/hanstunnel: . files
Message-ID:  <201311212337.rALNb5E0010786@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: brooks
Date: Thu Nov 21 23:37:05 2013
New Revision: 334544
URL: http://svnweb.freebsd.org/changeset/ports/334544

Log:
  Depend on clang33 rather than the deprecated clang port.
  
  STAGEify.
  
  Patch an obvious buffer overflow found by the compiler.
  
  Approved by:	maintainer timeout

Modified:
  head/net/hanstunnel/Makefile
  head/net/hanstunnel/files/patch-tun.cpp

Modified: head/net/hanstunnel/Makefile
==============================================================================
--- head/net/hanstunnel/Makefile	Thu Nov 21 23:31:54 2013	(r334543)
+++ head/net/hanstunnel/Makefile	Thu Nov 21 23:37:05 2013	(r334544)
@@ -3,6 +3,7 @@
 
 PORTNAME=	hans
 PORTVERSION=	0.4.1
+PORTREVISION=	1
 CATEGORIES=	net security
 MASTER_SITES=	SF/hanstunnel/source
 
@@ -21,30 +22,22 @@ PLIST_FILES=	bin/hans
 
 SUB_FILES=	pkg-message
 
-NO_STAGE=	yes
 .include <bsd.port.options.mk>
 
 .if ${PORT_OPTIONS:MCLANG}
-.if ${OSVERSION} < 1000000
-CC=clang
-CXX=clang++
-.if ${OSVERSION} < 900033
-BUILD_DEPENDS+=	clang:${PORTSDIR}/lang/clang
-.endif
+.if ${OSVERSION} >= 900033 && exists(/usr/bin/clang)
+CC=		clang
+CXX=		clang++
+.else
+BUILD_DEPENDS+=	clang33:${PORTSDIR}/lang/clang33
+CC=		clang33
+CXX=		clang++33
 .endif
 .else
 USE_GCC=4.2+
-CC=gcc
-CXX=g++
-CPP=gcpp
 .endif
 
 do-install:
-	@${INSTALL_PROGRAM} ${WRKSRC}/hans ${LOCALBASE}/bin
-
-post-install:	.SILENT
-	${ECHO_MSG}
-	${CAT} ${PKGMESSAGE}
-	${ECHO_MSG}
+	${INSTALL_PROGRAM} ${WRKSRC}/hans ${STAGEDIR}${LOCALBASE}/bin
 
 .include <bsd.port.mk>

Modified: head/net/hanstunnel/files/patch-tun.cpp
==============================================================================
--- head/net/hanstunnel/files/patch-tun.cpp	Thu Nov 21 23:31:54 2013	(r334543)
+++ head/net/hanstunnel/files/patch-tun.cpp	Thu Nov 21 23:37:05 2013	(r334544)
@@ -1,6 +1,19 @@
---- tun.cpp.orig	2010-02-17 17:30:21.000000000 +0200
-+++ tun.cpp	2013-04-04 16:55:39.802818893 +0300
-@@ -68,23 +68,17 @@
+
+$FreeBSD$
+
+--- tun.cpp.orig
++++ tun.cpp
+@@ -41,8 +41,7 @@
+ 
+ 	if (device != NULL)
+ 	{
+-		strncpy(this->device, device, VTUN_DEV_LEN);
+-		this->device[VTUN_DEV_LEN] = 0;
++		strlcpy(this->device, device, VTUN_DEV_LEN);
+ 	}
+ 	else
+ 		this->device[0] = 0;
+@@ -68,23 +67,17 @@
  	string ips = Utility::formatIp(ip);
  	string destIps = Utility::formatIp(destIp);
  



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201311212337.rALNb5E0010786>