From owner-svn-ports-all@freebsd.org Sat Jan 27 19:45:56 2018 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 37991ED3D17; Sat, 27 Jan 2018 19:45:56 +0000 (UTC) (envelope-from yuri@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E0DFD76D08; Sat, 27 Jan 2018 19:45:55 +0000 (UTC) (envelope-from yuri@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C18687110; Sat, 27 Jan 2018 19:45:55 +0000 (UTC) (envelope-from yuri@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w0RJjtrP083180; Sat, 27 Jan 2018 19:45:55 GMT (envelope-from yuri@FreeBSD.org) Received: (from yuri@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w0RJjtqY083177; Sat, 27 Jan 2018 19:45:55 GMT (envelope-from yuri@FreeBSD.org) Message-Id: <201801271945.w0RJjtqY083177@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: yuri set sender to yuri@FreeBSD.org using -f From: Yuri Victorovich Date: Sat, 27 Jan 2018 19:45:55 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r460146 - in head/security/tor-devel: . files X-SVN-Group: ports-head X-SVN-Commit-Author: yuri X-SVN-Commit-Paths: in head/security/tor-devel: . files X-SVN-Commit-Revision: 460146 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jan 2018 19:45:56 -0000 Author: yuri Date: Sat Jan 27 19:45:55 2018 New Revision: 460146 URL: https://svnweb.freebsd.org/changeset/ports/460146 Log: security/tor-devel: Update to 0.3.3.1 The announcement and the change log: https://blog.torproject.org/tor-0331-alpha-released-back-unstable-development Also, tor_setuid feature is merged from security/tor. Approved by: tcberner (mentor) Differential Revision: https://reviews.freebsd.org/D14066 Modified: head/security/tor-devel/Makefile head/security/tor-devel/distinfo head/security/tor-devel/files/tor.in Modified: head/security/tor-devel/Makefile ============================================================================== --- head/security/tor-devel/Makefile Sat Jan 27 19:40:37 2018 (r460145) +++ head/security/tor-devel/Makefile Sat Jan 27 19:45:55 2018 (r460146) @@ -2,7 +2,8 @@ # $FreeBSD$ PORTNAME= tor -DISTVERSION= 0.3.2.9 +DISTVERSION= 0.3.3.1 +DISTVERSIONSUFFIX= -alpha CATEGORIES= security net ipv6 MASTER_SITES= TOR PKGNAMESUFFIX= -devel Modified: head/security/tor-devel/distinfo ============================================================================== --- head/security/tor-devel/distinfo Sat Jan 27 19:40:37 2018 (r460145) +++ head/security/tor-devel/distinfo Sat Jan 27 19:45:55 2018 (r460146) @@ -1,3 +1,3 @@ -TIMESTAMP = 1515842195 -SHA256 (tor-0.3.2.9.tar.gz) = 435a7b91aa98d8b1a0ac1f60ca30c0ff3665b18a02e570bab5fe27935829160f -SIZE (tor-0.3.2.9.tar.gz) = 6250442 +TIMESTAMP = 1517017645 +SHA256 (tor-0.3.3.1-alpha.tar.gz) = 0a7c587645045eb37f3733ce75068fb5dea385b988e2a49c572b9e9193b9333a +SIZE (tor-0.3.3.1-alpha.tar.gz) = 6317585 Modified: head/security/tor-devel/files/tor.in ============================================================================== --- head/security/tor-devel/files/tor.in Sat Jan 27 19:40:37 2018 (r460145) +++ head/security/tor-devel/files/tor.in Sat Jan 27 19:45:55 2018 (r460146) @@ -21,6 +21,7 @@ # tor_disable_default_instance (str): Doesn't run the default instance. # Only valid when tor_instances is used. # Default: NO +# tor_setuid (str): Runtime setuid. Default: NO # # The instance definition that tor_instances expects: # inst_name{:inst_conf:inst_user:inst_group:inst_pidfile:inst_data_dir} @@ -42,6 +43,7 @@ load_rc_config ${name} : ${tor_pidfile="/var/run/tor/tor.pid"} : ${tor_datadir="/var/db/tor"} : ${tor_disable_default_instance="NO"} +: ${tor_setuid="NO"} instance=${slave_instance} if [ -n "${instance}" ]; then @@ -111,6 +113,18 @@ pidfile=${tor_pidfile} command="%%PREFIX%%/bin/${name}" command_args="-f ${tor_conf} --PidFile ${tor_pidfile} --RunAsDaemon 1 --DataDirectory ${tor_datadir}" extra_commands="reload" + +if [ $tor_setuid = "YES" ]; then + if ! grep -q "^User ${tor_user}$" ${tor_conf}; then + echo "User ${tor_user}" >> ${tor_conf} + fi + tor_user="root" + tor_group="wheel" +else + if grep -q "^User ${tor_user}$" ${tor_conf}; then + sed -i '' -e "s/^User ${tor_user}$//" ${tor_conf} + fi +fi if ! run_rc_command "$1"; then exit_code=1