From owner-svn-ports-all@freebsd.org Fri Jan 27 23:21:59 2017 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EA72CCC4D1B; Fri, 27 Jan 2017 23:21:59 +0000 (UTC) (envelope-from feld@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 mx1.freebsd.org (Postfix) with ESMTPS id A18E61C9; Fri, 27 Jan 2017 23:21:59 +0000 (UTC) (envelope-from feld@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0RNLwp0048276; Fri, 27 Jan 2017 23:21:58 GMT (envelope-from feld@FreeBSD.org) Received: (from feld@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0RNLwaT048274; Fri, 27 Jan 2017 23:21:58 GMT (envelope-from feld@FreeBSD.org) Message-Id: <201701272321.v0RNLwaT048274@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: feld set sender to feld@FreeBSD.org using -f From: Mark Felder Date: Fri, 27 Jan 2017 23:21:58 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-branches@freebsd.org Subject: svn commit: r432603 - in branches/2017Q1/www/uwsgi: . files X-SVN-Group: ports-branches 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.23 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: Fri, 27 Jan 2017 23:22:00 -0000 Author: feld Date: Fri Jan 27 23:21:58 2017 New Revision: 432603 URL: https://svnweb.freebsd.org/changeset/ports/432603 Log: MFH: r432602 www/uwsgi: Change default socket mode to 600 for security This change may be a disruptive for some users, but the default mode of 777 is a disaster waiting to happen. Approved by: ports-secteam (with hat) Modified: branches/2017Q1/www/uwsgi/Makefile branches/2017Q1/www/uwsgi/files/uwsgi.in Directory Properties: branches/2017Q1/ (props changed) Modified: branches/2017Q1/www/uwsgi/Makefile ============================================================================== --- branches/2017Q1/www/uwsgi/Makefile Fri Jan 27 23:21:22 2017 (r432602) +++ branches/2017Q1/www/uwsgi/Makefile Fri Jan 27 23:21:58 2017 (r432603) @@ -3,6 +3,7 @@ PORTNAME= uwsgi PORTVERSION= 2.0.14 +PORTREVISION= 1 CATEGORIES= www python MASTER_SITES= http://projects.unbit.it/downloads/ Modified: branches/2017Q1/www/uwsgi/files/uwsgi.in ============================================================================== --- branches/2017Q1/www/uwsgi/files/uwsgi.in Fri Jan 27 23:21:22 2017 (r432602) +++ branches/2017Q1/www/uwsgi/files/uwsgi.in Fri Jan 27 23:21:58 2017 (r432603) @@ -12,6 +12,8 @@ # Default is "NO". # uwsgi_socket (path/str): Set the path to the uwsgi unix socket # Default is /tmp/uwsgi.sock. +# uwsgi_socket_mode (int): Set the mode of the socket. +# Default is 600. # uwsgi_logfile (path): Set the path to the uwsgi log file # Default is /var/log/uwsgi.log. # uwsgi_pidfile (path): Set the path to the uwsgi pid file @@ -45,6 +47,7 @@ command=%%PREFIX%%/bin/uwsgi : ${uwsgi_enable="NO"} : ${uwsgi_profiles=""} : ${uwsgi_socket="/tmp/${name}.sock"} +: ${uwsgi_socket_mode="600"} : ${uwsgi_logfile="/var/log/${name}.log"} : ${uwsgi_pidfile="/var/run/${name}.pid"} : ${uwsgi_uid="80"} @@ -72,6 +75,7 @@ if [ -n "${uwsgi_profiles}" ]; then exit 1 fi eval uwsgi_socket=\${uwsgi_${profile}_socket:-"/tmp/${name}-${profile}.sock"} + eval uwsgi_socket_mode=\${uwsgi_${profile}_socket_mode:-"600"} eval uwsgi_logfile=\${uwsgi_${profile}_logfile:-"/var/log/${name}-${profile}.log"} eval uwsgi_pidfile=\${uwsgi_${profile}_pidfile:-"/var/run/${name}-${profile}.pid"} eval uwsgi_uid=\${uwsgi_${profile}_uid:-"${uwsgi_uid}"} @@ -88,7 +92,7 @@ if [ -n "${uwsgi_profiles}" ]; then fi command=%%PREFIX%%/bin/uwsgi -command_args="--pidfile ${uwsgi_pidfile} -s ${uwsgi_socket} -d ${uwsgi_logfile} --uid ${uwsgi_uid} --gid ${uwsgi_gid}" +command_args="--pidfile ${uwsgi_pidfile} -s ${uwsgi_socket} --chmod-socket=${uwsgi_socket_mode} -d ${uwsgi_logfile} --uid ${uwsgi_uid} --gid ${uwsgi_gid}" pidfile=${uwsgi_pidfile} stop_postcmd=stop_postcmd reload_precmd=reload_precmd