Gentoo Archives: gentoo-commits

From: Michael Orlitzky <mjo@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/pnp4nagios/
Date: Sat, 04 Nov 2017 23:40:24
Message-Id: 1509838640.184ae2c637ba60cd8f65d33c9098a2f4a079b4dc.mjo@gentoo
1 commit: 184ae2c637ba60cd8f65d33c9098a2f4a079b4dc
2 Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
3 AuthorDate: Thu Nov 2 17:08:14 2017 +0000
4 Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
5 CommitDate: Sat Nov 4 23:37:20 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=184ae2c6
7
8 net-analyzer/pnp4nagios: new revision with a better fix for CVE-2012-3457.
9
10 In CVE-2012-3457, it was reported that one particular file should not
11 be world-readable. To fix that, our ebuild made all of /etc/pnp
12 unreadable; that made other permissions issues difficult to work
13 around. This r2 sets o-rwx only on /etc/pnp/process_perfdata.cfg.
14
15 Bug: https://bugs.gentoo.org/430358
16 Package-Manager: Portage-2.3.8, Repoman-2.3.3
17
18 ...0.6.26-r1.ebuild => pnp4nagios-0.6.26-r2.ebuild} | 21 +++++++--------------
19 1 file changed, 7 insertions(+), 14 deletions(-)
20
21 diff --git a/net-analyzer/pnp4nagios/pnp4nagios-0.6.26-r1.ebuild b/net-analyzer/pnp4nagios/pnp4nagios-0.6.26-r2.ebuild
22 similarity index 84%
23 rename from net-analyzer/pnp4nagios/pnp4nagios-0.6.26-r1.ebuild
24 rename to net-analyzer/pnp4nagios/pnp4nagios-0.6.26-r2.ebuild
25 index c15a8c98de6..818bc3104ff 100644
26 --- a/net-analyzer/pnp4nagios/pnp4nagios-0.6.26-r1.ebuild
27 +++ b/net-analyzer/pnp4nagios/pnp4nagios-0.6.26-r2.ebuild
28 @@ -74,25 +74,18 @@ src_install() {
29 rm "${ED%/}/usr/share/pnp/install.php" || \
30 die "unable to remove ${ED%/}/usr/share/pnp/install.php"
31
32 + # Fix CVE-2012-3457 (Gentoo bug 430358)
33 + fperms o-rwx /etc/pnp/process_perfdata.cfg
34 +
35 if use apache2 ; then
36 insinto "${APACHE_MODULES_CONFDIR}"
37 newins "${FILESDIR}"/98_pnp4nagios-2.4.conf 98_pnp4nagios.conf
38
39 - # Allow the apache user to read our config files. This same
40 - # approach is used in net-analyzer/nagios-core.
41 - chgrp -R apache "${ED%/}/etc/pnp" \
42 - || die "failed to change group of ${ED%/}/etc/pnp"
43 + # This one file isn't world-readable, but it should be group-
44 + # readable. Give it to the "apache" group to let the web
45 + # server read it.
46 + fowners :apache /etc/pnp/process_perfdata.cfg
47 fi
48 -
49 - # Bug 430358 - CVE-2012-3457
50 - local f
51 - while IFS="" read -d $'\0' -r f ; do
52 - chmod 0640 "${f}" || die
53 - done < <(find "${ED%/}/etc/pnp" -type f)
54 -
55 - while IFS="" read -d $'\0' -r f ; do
56 - chmod 0750 "${f}" || die
57 - done < <(find "${ED%/}/etc/pnp" -type d)
58 }
59
60 pkg_postinst() {