Skip to content

Commit

Permalink
media-gfx/imagemagick: Hardening is not needed for a long time
Browse files Browse the repository at this point in the history
Bug: https://bugs.gentoo.org/716674
Package-Manager: Portage-2.3.96, Repoman-2.3.22
Signed-off-by: Pacho Ramos <[email protected]>
  • Loading branch information
pacho2 committed Apr 22, 2020
1 parent db54238 commit a16dd02
Showing 1 changed file with 0 additions and 42 deletions.
42 changes: 0 additions & 42 deletions media-gfx/imagemagick/imagemagick-9999.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -83,16 +83,6 @@ S="${WORKDIR}/${MY_P}"
src_prepare() {
default

# Apply hardening #664236
cp "${FILESDIR}"/policy-hardening.snippet "${S}" || die
sed -i -e '/^<policymap>$/ {
r policy-hardening.snippet
d
}' \
config/policy.xml || \
die "Failed to apply hardening of policy.xml"
einfo "policy.xml hardened"

elibtoolize # for Darwin modules

# For testsuite, see https://bugs.gentoo.org/show_bug.cgi?id=500580#c3
Expand Down Expand Up @@ -233,35 +223,3 @@ src_install() {
insinto /usr/share/${PN}
doins config/*icm
}

pkg_postinst() {
local _show_policy_xml_notice=

if [[ -z "${REPLACING_VERSIONS}" ]]; then
# This is a new installation
_show_policy_xml_notice=yes
else
local v
for v in ${REPLACING_VERSIONS}; do
if ! ver_test "${v}" -gt "7.0.8.10-r2"; then
# This is an upgrade
_show_policy_xml_notice=yes

# Show this elog only once
break
fi
done
fi

if [[ -n "${_show_policy_xml_notice}" ]]; then
elog "For security reasons, a policy.xml file was installed in /etc/ImageMagick-7"
elog "which will prevent the usage of the following coders by default:"
elog ""
elog " - PS"
elog " - PS2"
elog " - PS3"
elog " - EPS"
elog " - PDF"
elog " - XPS"
fi
}

0 comments on commit a16dd02

Please sign in to comment.