[WIP] Fix SELinux permissions

This commit is contained in:
Vladimir Stoilov
2024-08-27 14:30:04 +03:00
parent 9bae1afd73
commit f7abb700bf
4 changed files with 26 additions and 5 deletions

View File

@@ -1,5 +1,16 @@
#!/bin/bash
chmod +x /usr/lib/portmaster/portmaster-core
#
# Fix selinux permissions for portmaster-core if we have semanage
# available.
#
if command -V semanage >/dev/null 2>&1; then
semanage fcontext -a -t bin_t -s system_u $(realpath /usr/lib)'/portmaster/portmaster-core' || :
restorecon -R /usr/lib/portmaster/portmaster-core 2>/dev/null >&2 || :
fi
systemctl daemon-reload
systemctl enable portmaster.service