diff options
author | Jason A. Donenfeld <zx2c4@gentoo.org> | 2016-12-15 05:40:30 +0100 |
---|---|---|
committer | Jason A. Donenfeld <zx2c4@gentoo.org> | 2016-12-15 05:42:03 +0100 |
commit | 38b6fafecf4a802d0c7d9f6b0a6ddf4c94056220 (patch) | |
tree | 0bbfe164e34de23fc9e4ba62d61f0a8183e9eff7 /sys-auth | |
parent | x11-libs/gdk-pixbuf: bump to 2.36.1 (diff) | |
download | gentoo-38b6fafecf4a802d0c7d9f6b0a6ddf4c94056220.tar.gz gentoo-38b6fafecf4a802d0c7d9f6b0a6ddf4c94056220.tar.bz2 gentoo-38b6fafecf4a802d0c7d9f6b0a6ddf4c94056220.zip |
sys-auth/munge: fix lpe, bug 602596
Package-Manager: Portage-2.3.3, Repoman-2.3.1
Diffstat (limited to 'sys-auth')
-rw-r--r-- | sys-auth/munge/files/munged.initd | 14 | ||||
-rw-r--r-- | sys-auth/munge/munge-0.5.10-r2.ebuild (renamed from sys-auth/munge/munge-0.5.10-r1.ebuild) | 3 | ||||
-rw-r--r-- | sys-auth/munge/munge-0.5.11-r1.ebuild (renamed from sys-auth/munge/munge-0.5.11.ebuild) | 1 |
3 files changed, 10 insertions, 8 deletions
diff --git a/sys-auth/munge/files/munged.initd b/sys-auth/munge/files/munged.initd index d1ac230c7642..c53219d2ae85 100644 --- a/sys-auth/munge/files/munged.initd +++ b/sys-auth/munge/files/munged.initd @@ -1,5 +1,5 @@ #!/sbin/openrc-run -# Copyright 1999-2012 Gentoo Foundation +# Copyright 1999-2016 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Id$ @@ -9,20 +9,24 @@ depend() { check_key() { [ -s "${KEYFILE}" ] && return 0 - dd if=/dev/urandom bs=1 count=1024 >/etc/munge/munge.key 2>/dev/null || return 1 - chown munge:munge "${KEYFILE}" || return 1 - chmod 700 "${KEYFILE}" || return 1 + local old_umask=$(umask) + local ret + umask 037 + dd if=/dev/urandom bs=1024 count=1 of="${KEYFILE}" 2>/dev/null; ret=$? + umask $old_umask + return $ret } start() { ebegin "Starting munged" if ! check_key; then - eerror "Failed to verify/create munge key" + eerror "Failed to create munge key" eend 1 && exit 1 fi checkpath -d -m 755 -o munge:munge /var/run/munge checkpath -d -m 711 -o munge:munge /var/lib/munge checkpath -d -m 700 -o munge:munge /var/log/munge + checkpath -f -m 640 -o root:munge "${KEYFILE}" start-stop-daemon -S /usr/sbin/munged \ --user munge \ --group munge \ diff --git a/sys-auth/munge/munge-0.5.10-r1.ebuild b/sys-auth/munge/munge-0.5.10-r2.ebuild index db28eb0208b2..35975e8ff2ce 100644 --- a/sys-auth/munge/munge-0.5.10-r1.ebuild +++ b/sys-auth/munge/munge-0.5.10-r2.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2014 Gentoo Foundation +# Copyright 1999-2016 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Id$ @@ -46,7 +46,6 @@ src_install() { rm -rf "${D}"/var/run || die fi - diropts -o munge -g munge -m700 dodir /etc/munge || die [ -d "${D}"/etc/init.d ] && rm -r "${D}"/etc/init.d diff --git a/sys-auth/munge/munge-0.5.11.ebuild b/sys-auth/munge/munge-0.5.11-r1.ebuild index 5ca486579d88..4736ded9335f 100644 --- a/sys-auth/munge/munge-0.5.11.ebuild +++ b/sys-auth/munge/munge-0.5.11-r1.ebuild @@ -51,7 +51,6 @@ src_install() { rm -rf "${ED}"/var/run || die fi - [[ ${EUID} = 0 ]] && diropts -o munge -g munge -m700 dodir /etc/munge for d in "init.d" "default" "sysconfig"; do |