Skip to content

Commit

Permalink
imagemagick: Prevent GhostScript processing
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas committed Aug 23, 2018
1 parent a7f7da9 commit cb12eb0
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions imagemagick.be0
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,19 @@ mee_build() {
mee_install() {
bee_install
}

mee_install_post() {
local tgt=${D}/etc/ImageMagick-6/policy.xml
cp -p -v ${tgt} ${tgt}.raw
xmllint --format ${tgt}.raw > ${tgt}
rm ${tgt}.raw
sed -i -e "/<\/policymap>/ d" ${tgt}
cat <<-XML >> ${tgt}
<!-- prevent GhostScript processing -->
<policy domain="coder" rights="none" pattern="PS" />
<policy domain="coder" rights="none" pattern="EPS" />
<policy domain="coder" rights="none" pattern="PDF" />
<policy domain="coder" rights="none" pattern="XPS" />
</policymap>
XML
}

0 comments on commit cb12eb0

Please sign in to comment.