From owner-svn-ports-head@FreeBSD.ORG Thu Nov 21 23:37:06 2013 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1F8AE699; Thu, 21 Nov 2013 23:37:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E938320FF; Thu, 21 Nov 2013 23:37:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rALNb56D010789; Thu, 21 Nov 2013 23:37:05 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rALNb5E0010786; Thu, 21 Nov 2013 23:37:05 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201311212337.rALNb5E0010786@svn.freebsd.org> From: Brooks Davis Date: Thu, 21 Nov 2013 23:37:05 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r334544 - in head/net/hanstunnel: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Nov 2013 23:37:06 -0000 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 .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 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);