Date: Mon, 16 Mar 2020 19:42:02 +0000 (UTC) From: "Sergey A. Osokin" <osa@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r528539 - in head/www/unit: . files Message-ID: <202003161942.02GJg2vC026801@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: osa Date: Mon Mar 16 19:42:01 2020 New Revision: 528539 URL: https://svnweb.freebsd.org/changeset/ports/528539 Log: Change default user for non-priveleged processes of NGINX Unit from `nobody' to `www' user. Also check the directory for temporary files exists and has correct permissions. Bump PORTREVISION. Modified: head/www/unit/Makefile head/www/unit/files/unitd.in Modified: head/www/unit/Makefile ============================================================================== --- head/www/unit/Makefile Mon Mar 16 19:15:45 2020 (r528538) +++ head/www/unit/Makefile Mon Mar 16 19:42:01 2020 (r528539) @@ -3,6 +3,7 @@ PORTNAME= unit PORTVERSION= 1.16.0 +PORTREVISION= 1 CATEGORIES= www MASTER_SITES= https://unit.nginx.org/download/ @@ -48,16 +49,25 @@ CONFIGURE_ARGS= --prefix=${PREFIX} \ --modules=libexec/unit/modules \ --pid=${UNIT_PIDFILE} \ --state=libexec/unit \ - --tmp=${UNIT_TMPDIR} + --tmp=${UNIT_TMPDIR} \ + --user=${WWWOWN} --group=${WWWGRP} -PLIST_FILES?= sbin/unitd +USERS?= ${WWWOWN} +GROUPS?=${WWWGRP} + +ALL_TARGET= + PLIST_DIRS?= libexec/unit/modules \ libexec/unit +PLIST_FILES?= sbin/unitd USE_RC_SUBR?= unitd SUB_LIST= PREFIX=${PREFIX} \ UNIT_PIDFILE=${UNIT_PIDFILE} \ - UNIT_SOCK=${UNIT_SOCK} + UNIT_SOCK=${UNIT_SOCK} \ + UNIT_TMPDIR=${UNIT_TMPDIR} \ + WWWOWN=${WWWOWN} \ + WWWGRP=${WWWGRP} .if ${PORT_OPTIONS:MDEBUG} CONFIGURE_ARGS+=--debug Modified: head/www/unit/files/unitd.in ============================================================================== --- head/www/unit/files/unitd.in Mon Mar 16 19:15:45 2020 (r528538) +++ head/www/unit/files/unitd.in Mon Mar 16 19:42:01 2020 (r528539) @@ -21,9 +21,20 @@ rcvar=unitd_enable command="%%PREFIX%%/sbin/unitd" start_precmd=start_precmd +_tmpprefix="%%UNIT_TMPDIR%%" +unitd_checktmpdir() +{ + if [ ! -d ${_tmpprefix} ] ; then + install -d -o %%WWWOWN%% -g %%WWWGRP%% -m 755 ${_tmpprefix} + else + chown -R %%WWWOWN%%:%%WWWGRP%% ${_tmpprefix} + fi +} + start_precmd() { + unitd_checktmpdir rm -f %%UNIT_SOCK%% }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202003161942.02GJg2vC026801>