net-analyzer/pnp4nagios: new revision to fix insecure config permissions.
authorMichael Orlitzky <mjo@gentoo.org>
Thu, 2 Nov 2017 17:27:17 +0000 (13:27 -0400)
committerMichael Orlitzky <mjo@gentoo.org>
Sat, 4 Nov 2017 23:37:21 +0000 (19:37 -0400)
Previous revisions of pnp4nagios install /etc/pnp owned by the "nagios
user," and the npcd daemon also runs as that user. That configuration
is insecure: the unprivileged user can edit /etc/pnp/npcd.cfg, and
escalate his own privileges by setting "user = root". To avoid the
problem, we set INSTALL_OPTS="" while running "emake install". That
leaves all of /etc/pnp with the default (root:root) ownership.

Bug: https://github.com/lingej/pnp4nagios/issues/140
Package-Manager: Portage-2.3.8, Repoman-2.3.3

net-analyzer/pnp4nagios/pnp4nagios-0.6.26-r3.ebuild [moved from net-analyzer/pnp4nagios/pnp4nagios-0.6.26-r2.ebuild with 93% similarity]

similarity index 93%
rename from net-analyzer/pnp4nagios/pnp4nagios-0.6.26-r2.ebuild
rename to net-analyzer/pnp4nagios/pnp4nagios-0.6.26-r3.ebuild
index 818bc3104ffe89fc7d25372e1790ed09b80de85a..ce886f53738a100b0779a5957a85c363cd5658b8 100644 (file)
@@ -68,7 +68,9 @@ src_compile() {
 }
 
 src_install() {
-       emake DESTDIR="${D}" install install-config
+       # Don't use INSTALL_OPTS because they set insecure permissions on
+       # all of /etc/pnp (https://github.com/lingej/pnp4nagios/issues/140).
+       emake INSTALL_OPTS="" DESTDIR="${D}" install install-config
        einstalldocs
        newinitd "${FILESDIR}"/npcd.initd npcd
        rm "${ED%/}/usr/share/pnp/install.php" || \