Local policy control in ImageMagick

0

In ImageMagick, is there any way to control policy locally? Something like ~/.imagemagick/policy.xml.

Update:

$ dpkg -l imagemagick
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-=================================
ii  imagemagick    8:6.8.9.9-7u amd64        image manipulation programs -- bi

$ convert --version
Version: ImageMagick 6.8.9-9 Q16 x86_64 2018-09-28 http://www.imagemagick.org

nightcod3r

Posted 2018-10-23T05:01:06.197

Reputation: 103

Answers

0

ImageMagick v6 & v7 looks for all files in ~/.config/ImageMagick/ in addition to /etc.

This includes policy.xml, although I'm not sure what order the policy directives are processed in.

(ImageMagick v6 also used ~/.magick/, but this is an obsolete location removed from v7.)

To determine what files a program might be looking for, you can use strace:

strace -e file display test.png |& grep policy.xml

user1686

Posted 2018-10-23T05:01:06.197

Reputation: 283 655

Is there any option for v8? that's the one I'm currently using (8:6.8.9.9-7u), but placing policy.xml in that folder doesn't seem to work. – nightcod3r – 2018-10-23T14:35:08.530

ImageMagick v8 does not exist as far as I could determine. Even the latest Git master calls itself "version 7.0.8". – user1686 – 2018-10-23T14:38:05.387

Please, see update in the question. – nightcod3r – 2018-10-23T15:32:28.553

That's not v8. That's v6.8.9, Debian package 'epoch' #8. – user1686 – 2018-10-23T15:50:26.570

According to this post, the only way to use the local policy configuration is to rebuild ImageMagick... https://www.imagemagick.org/discourse-server/viewtopic.php?t=29618 , or, to be more precise, you can only control what is not disabled globally: https://stackoverflow.com/a/52719789/4179803

– nightcod3r – 2018-10-23T16:27:51.900