Package: spamassassin Version: 3.4.1-6+deb9u1 Severity: normal User: selinux-de...@lists.alioth.debian.org Usertags: selinux
Hi, On package installation, the /var/lib/spamassassin directory ends up wrongly labeled on disk. There are two solutions here to fix this problem, either: 1) ship the directory in the package itself and do not create it in the postinst script. This has also the advantage that dpkg -S will return the owner of the directory. 2) Call restorecon just after creating the directory (before creating anything else in it), something like: "which restorecon >/dev/null 2>&1 && restorecon /var/lib/spamassassin" should work. Kind regards, Laurent Bigonville -- System Information: Debian Release: buster/sid APT prefers unstable-debug APT policy: (500, 'unstable-debug'), (500, 'unstable'), (1, 'experimental-debug'), (1, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.15.0-1-amd64 (SMP w/4 CPU cores) Locale: LANG=fr_BE.UTF-8, LC_CTYPE=fr_BE.UTF-8 (charmap=UTF-8), LANGUAGE=fr_BE.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: SELinux: enabled - Mode: Permissive - Policy name: refpolicy