Date: Fri, 27 Jan 2017 23:21:23 +0000 (UTC) From: Mark Felder <feld@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r432602 - in head/www/uwsgi: . files Message-ID: <201701272321.v0RNLN5w048079@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: feld Date: Fri Jan 27 23:21:22 2017 New Revision: 432602 URL: https://svnweb.freebsd.org/changeset/ports/432602 Log: 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. MFH: 2017Q1 Modified: head/www/uwsgi/Makefile head/www/uwsgi/files/uwsgi.in Modified: head/www/uwsgi/Makefile ============================================================================== --- head/www/uwsgi/Makefile Fri Jan 27 23:01:05 2017 (r432601) +++ head/www/uwsgi/Makefile Fri Jan 27 23:21:22 2017 (r432602) @@ -3,6 +3,7 @@ PORTNAME= uwsgi PORTVERSION= 2.0.14 +PORTREVISION= 1 CATEGORIES= www python MASTER_SITES= http://projects.unbit.it/downloads/ Modified: head/www/uwsgi/files/uwsgi.in ============================================================================== --- head/www/uwsgi/files/uwsgi.in Fri Jan 27 23:01:05 2017 (r432601) +++ head/www/uwsgi/files/uwsgi.in Fri Jan 27 23:21:22 2017 (r432602) @@ -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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201701272321.v0RNLN5w048079>