From owner-dev-commits-ports-all@freebsd.org Tue Jun 8 15:20:14 2021 Return-Path: Delivered-To: dev-commits-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8513B639444; Tue, 8 Jun 2021 15:20:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Fzv7L3PDzz3JYS; Tue, 8 Jun 2021 15:20:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5D595338A; Tue, 8 Jun 2021 15:20:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 158FKEjg058079; Tue, 8 Jun 2021 15:20:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 158FKEUw058077; Tue, 8 Jun 2021 15:20:14 GMT (envelope-from git) Date: Tue, 8 Jun 2021 15:20:14 GMT Message-Id: <202106081520.158FKEUw058077@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org From: Lewis Cook Subject: git: 3d3959434d97 - 2021Q2 - sysutils/zrepl: /var/run/zrepl should not be world-readable MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: lcook X-Git-Repository: ports X-Git-Refname: refs/heads/2021Q2 X-Git-Reftype: branch X-Git-Commit: 3d3959434d9744fa26de7a15119e2e98578f3503 Auto-Submitted: auto-generated X-BeenThere: dev-commits-ports-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the ports repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jun 2021 15:20:14 -0000 The branch 2021Q2 has been updated by lcook: URL: https://cgit.FreeBSD.org/ports/commit/?id=3d3959434d9744fa26de7a15119e2e98578f3503 commit 3d3959434d9744fa26de7a15119e2e98578f3503 Author: Lewis Cook AuthorDate: 2021-06-08 15:09:48 +0000 Commit: Lewis Cook CommitDate: 2021-06-08 15:19:20 +0000 sysutils/zrepl: /var/run/zrepl should not be world-readable This partially reverts commit 2a866a1, and instead installs the pidfile to /var/run/zrepl.pid fixing the problem seen in PR 255981. As taken from the zrepl documentation[1]: [....] The zrepl daemon needs to open various UNIX sockets in a runtime directory: a control socket that the CLI commands use to interact with the daemon the ssh+stdinserver Transport listener opens one socket per configured client, named after client_identity parameter There is no authentication on these sockets except the UNIX permissions. The zrepl daemon will refuse to bind any of the above sockets in a directory that is world-accessible. [....] [1] https://zrepl.github.io/configuration/misc.html#runtime-directories-unix-sockets PR: 256472 Reported by: Raúl (cherry picked from commit 621d9c9f594a0f7d049cb44dab25efed81c35c91) --- sysutils/zrepl/Makefile | 2 +- sysutils/zrepl/files/zrepl.in | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sysutils/zrepl/Makefile b/sysutils/zrepl/Makefile index 124fc8f2eff4..23b3cc16c683 100644 --- a/sysutils/zrepl/Makefile +++ b/sysutils/zrepl/Makefile @@ -3,7 +3,7 @@ PORTNAME= zrepl DISTVERSIONPREFIX= v DISTVERSION= 0.4.0 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= sysutils MAINTAINER= lcook@FreeBSD.org diff --git a/sysutils/zrepl/files/zrepl.in b/sysutils/zrepl/files/zrepl.in index 57a4d48ce0b6..095a43f0d610 100644 --- a/sysutils/zrepl/files/zrepl.in +++ b/sysutils/zrepl/files/zrepl.in @@ -40,7 +40,7 @@ load_rc_config $name : ${zrepl_priority:="alert"} : ${zrepl_options:="${zrepl_flags} --config ${zrepl_config}"} -pidfile="/var/run/zrepl/daemon.pid" +pidfile="/var/run/zrepl.pid" command="/usr/sbin/daemon" procname="%%PREFIX%%/bin/zrepl" command_args="-p ${pidfile} %%DAEMON_LOGGING%% ${procname} ${zrepl_options} daemon" @@ -54,8 +54,8 @@ extra_commands="configtest" zrepl_precmd() { if [ ! -d "/var/run/zrepl/stdinserver" ]; then - install -d -g ${zrepl_group} -o ${zrepl_user} -m 0755 -- "/var/run/zrepl"; - install -d -g ${zrepl_group} -o ${zrepl_user} -m 0755 -- "/var/run/zrepl/stdinserver"; + install -d -g ${zrepl_group} -o ${zrepl_user} -m 0700 -- "/var/run/zrepl"; + install -d -g ${zrepl_group} -o ${zrepl_user} -m 0700 -- "/var/run/zrepl/stdinserver"; fi if [ ! -e "${pidfile}" ]; then