From d0290076158b6c171ce600950552067fcf4257a9 Mon Sep 17 00:00:00 2001 From: chbmb Date: Wed, 6 May 2020 14:55:46 +0100 Subject: [PATCH] ImageMagick policy https://github.com/linuxserver/docker-calibre-web/issues/75 --- README.md | 1 + readme-vars.yml | 1 + root/defaults/policy.xml | 80 ++++++++++++++++++++++++++++++++++ root/etc/cont-init.d/30-config | 6 +++ 4 files changed, 88 insertions(+) create mode 100644 root/defaults/policy.xml diff --git a/README.md b/README.md index f475c6c..bcecd95 100644 --- a/README.md +++ b/README.md @@ -243,6 +243,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64 ## Versions +* **06.05.20:** - Add libxslt1.1 and update ImageMagick policy * **19.01.20:** - Adding LDAP libs. * **13.10.19:** - Migrate to Python3. * **01.08.19:** - Add libxcomposite1. diff --git a/readme-vars.yml b/readme-vars.yml index fc30799..38fb9b1 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -70,6 +70,7 @@ app_setup_block: | # changelog changelogs: + - { date: "06.05.20:", desc: "Add libxslt1.1 and update ImageMagick policy" } - { date: "19.01.20:", desc: "Adding LDAP libs." } - { date: "13.10.19:", desc: "Migrate to Python3." } - { date: "01.08.19:", desc: "Add libxcomposite1." } diff --git a/root/defaults/policy.xml b/root/defaults/policy.xml new file mode 100644 index 0000000..5ec3385 --- /dev/null +++ b/root/defaults/policy.xml @@ -0,0 +1,80 @@ + + + + + + + + +]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/root/etc/cont-init.d/30-config b/root/etc/cont-init.d/30-config index 17cefcb..f30293f 100644 --- a/root/etc/cont-init.d/30-config +++ b/root/etc/cont-init.d/30-config @@ -1,5 +1,11 @@ #!/usr/bin/with-contenv bash +# create symlinks for imagemagick policy.xml +[[ -f /etc/ImageMagick-6/policy.xml ]] && \ + rm /etc/ImageMagick-6/policy.xml +[[ ! -L /etc/ImageMagick-6/policy.xml ]] && \ + ln -s /defaults/policy.xml /etc/ImageMagick-6/policy.xml + # create symlinks for database and log [[ ! -f /config/app.db ]] && \ cp /defaults/app.db /config/app.db