public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: net-vpn/peervpn/files/, net-vpn/peervpn/
@ 2017-09-03 21:53 Zac Medico
  0 siblings, 0 replies; only message in thread
From: Zac Medico @ 2017-09-03 21:53 UTC (permalink / raw
  To: gentoo-commits

commit:     fe0d13da698c205e0d71eff7c1fb5ef12b3b83ca
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sun Sep  3 21:39:40 2017 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sun Sep  3 21:53:10 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fe0d13da

net-vpn/peervpn: revbump to 0.044-r4 for bug 629418

Package-Manager: Portage-2.3.8, Repoman-2.3.2

 net-vpn/peervpn/files/peervpn.initd                       |  9 ++-------
 .../{peervpn-0.044-r3.ebuild => peervpn-0.044-r4.ebuild}  | 15 +++++++++++++--
 2 files changed, 15 insertions(+), 9 deletions(-)

diff --git a/net-vpn/peervpn/files/peervpn.initd b/net-vpn/peervpn/files/peervpn.initd
index b02458ae16c..15390d4e866 100644
--- a/net-vpn/peervpn/files/peervpn.initd
+++ b/net-vpn/peervpn/files/peervpn.initd
@@ -1,9 +1,9 @@
 #!/sbin/openrc-run
-# Copyright 2016 Gentoo Foundation
+# Copyright 2016-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 description="peervpn server"
-pidfile=${pidfile:-"/run/${SVCNAME}/${SVCNAME}.pid"}
+pidfile=${pidfile:-"/run/${SVCNAME}.pid"}
 logfile=${logfile:-"/var/log/${SVCNAME}/${SVCNAME}.log"}
 user=${SVCNAME}
 group=${SVCNAME}
@@ -18,9 +18,4 @@ start_stop_daemon_args="
 
 depend() {
 	need net
-	after net
-}
-
-start_pre() {
-	checkpath -d -m 0755 -o "${user}":"${group}" "${pidfile%/*}"
 }

diff --git a/net-vpn/peervpn/peervpn-0.044-r3.ebuild b/net-vpn/peervpn/peervpn-0.044-r4.ebuild
similarity index 70%
rename from net-vpn/peervpn/peervpn-0.044-r3.ebuild
rename to net-vpn/peervpn/peervpn-0.044-r4.ebuild
index 14ae94d7c02..158c4a4da2b 100644
--- a/net-vpn/peervpn/peervpn-0.044-r3.ebuild
+++ b/net-vpn/peervpn/peervpn-0.044-r4.ebuild
@@ -42,8 +42,9 @@ src_install() {
 
 	insinto /etc/${PN}
 	newins peervpn.conf peervpn.conf.example
-	fowners ${PN}:${PN} /etc/${PN}
-	fperms 0700 /etc/${PN}
+	# read-only group access for bug 629418
+	fowners root:${PN} /etc/${PN}
+	fperms 0750 /etc/${PN}
 
 	newinitd "${FILESDIR}/${PN}.initd" "${PN}"
 	systemd_dounit "${FILESDIR}/${PN}.service"
@@ -52,3 +53,13 @@ src_install() {
 	insinto /etc/logrotate.d
 	newins "${FILESDIR}/${PN}.logrotated" "${PN}"
 }
+
+pkg_preinst() {
+	if ! has_version '>=net-vpn/peervpn-0.044-r4' && \
+		[[ -d ${EROOT}etc/${PN} &&
+		$(find "${EROOT}etc/peervpn" ! -user root -print) ]]; then
+		ewarn "Tightening '${EROOT}etc/${PN}' permissions for bug 629418"
+		chown -R root:${PN} "${EROOT}etc/${PN}" || die
+		chmod -R g+rX-w,o-rwx "${EROOT}etc/${PN}" || die
+	fi
+}


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-09-03 21:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-03 21:53 [gentoo-commits] repo/gentoo:master commit in: net-vpn/peervpn/files/, net-vpn/peervpn/ Zac Medico

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox