diff --git a/profiles/apparmor.d/locale b/profiles/apparmor.d/locale new file mode 100644 index 000000000..f5dc82ffe --- /dev/null +++ b/profiles/apparmor.d/locale @@ -0,0 +1,35 @@ +#------------------------------------------------------------------ +# Copyright (C) 2025 Canonical Ltd. +# +# Author: Giampaolo Fresi Roglia (gianz) +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of version 2 of the GNU General Public +# License published by the Free Software Foundation. +#------------------------------------------------------------------ +# vim: ft=apparmor + +abi , + +#include + +@{compressors}=/usr/bin/gzip /usr/bin/bzip2 + +profile locale /usr/bin/locale { + include + + file r /usr/share/i18n/charmaps/, + file r /usr/share/i18n/charmaps/*, + + file Cxrm @{compressors} -> compressor, + + profile compressor { + include + file r @{compressors}, + file r /usr/share/i18n/charmaps/, + file r /usr/share/i18n/charmaps/*, + } + + include if exists +} +