diff options
author | Zac Medico <zmedico@gentoo.org> | 2017-09-14 14:57:13 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2017-09-14 14:57:13 -0700 |
commit | d4a8e93f7acac4b31eec56c557eaa2e8877efed0 (patch) | |
tree | 3ad738988788f9863dbe0eef222350ce4a87b8af /net-vpn | |
parent | www-servers/mongoose: remove old version (diff) | |
download | gentoo-d4a8e93f7acac4b31eec56c557eaa2e8877efed0.tar.gz gentoo-d4a8e93f7acac4b31eec56c557eaa2e8877efed0.tar.bz2 gentoo-d4a8e93f7acac4b31eec56c557eaa2e8877efed0.zip |
net-vpn/peervpn: tighten pkg_preinst chown/chmod calls
Package-Manager: Portage-2.3.8, Repoman-2.3.2
Diffstat (limited to 'net-vpn')
-rw-r--r-- | net-vpn/peervpn/peervpn-0.044-r4.ebuild | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/net-vpn/peervpn/peervpn-0.044-r4.ebuild b/net-vpn/peervpn/peervpn-0.044-r4.ebuild index 158c4a4da2b0..27b19165e236 100644 --- a/net-vpn/peervpn/peervpn-0.044-r4.ebuild +++ b/net-vpn/peervpn/peervpn-0.044-r4.ebuild @@ -57,9 +57,11 @@ src_install() { pkg_preinst() { if ! has_version '>=net-vpn/peervpn-0.044-r4' && \ [[ -d ${EROOT}etc/${PN} && - $(find "${EROOT}etc/peervpn" ! -user root -print) ]]; then + $(find "${EROOT}etc/${PN}" -user "${PN}" ! -type l -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 + while read -r -d ''; do + chown root:${PN} "${REPLY}" || die + chmod g+rX-w,o-rwx "${REPLY}" || die + done < <(find "${EROOT}etc/${PN}" -user "${PN}" ! -type l -print0) fi } |