We have multiple log files that produced by IPA components. Some of them are written by the tools that run as root and inherit their file context from /var/log -> var_log_t. However, increasingly we get tools that were run through oddjob helpers. These supposed to be run within ipa_helper_t SELinux context which has write permissions for ipa_log_t file context.
List of files can be found by running the following script:
$ git grep '_LOG = .*ipa.*\.log' ipaplatform/base/paths.py | cut -d= -f2 | \ xargs -I% echo -e "%\t--\tgen_context(system_u:object_r:ipa_log_t,s0)" /var/log/ipabackup.log -- gen_context(system_u:object_r:ipa_log_t,s0) /var/log/ipaclient-install.log -- gen_context(system_u:object_r:ipa_log_t,s0) /var/log/ipaclient-uninstall.log -- gen_context(system_u:object_r:ipa_log_t,s0) /var/log/ipaclientsamba-install.log -- gen_context(system_u:object_r:ipa_log_t,s0) /var/log/ipaclientsamba-uninstall.log -- gen_context(system_u:object_r:ipa_log_t,s0) /var/log/ipareplica-ca-install.log -- gen_context(system_u:object_r:ipa_log_t,s0) /var/log/ipareplica-conncheck.log -- gen_context(system_u:object_r:ipa_log_t,s0) /var/log/ipareplica-install.log -- gen_context(system_u:object_r:ipa_log_t,s0) /var/log/iparestore.log -- gen_context(system_u:object_r:ipa_log_t,s0) /var/log/ipaserver-enable-sid.log -- gen_context(system_u:object_r:ipa_log_t,s0) /var/log/ipaserver-install.log -- gen_context(system_u:object_r:ipa_log_t,s0) /var/log/ipaserver-adtrust-install.log -- gen_context(system_u:object_r:ipa_log_t,s0) /var/log/ipaserver-dns-install.log -- gen_context(system_u:object_r:ipa_log_t,s0) /var/log/ipaserver-kra-install.log -- gen_context(system_u:object_r:ipa_log_t,s0) /var/log/ipaserver-uninstall.log -- gen_context(system_u:object_r:ipa_log_t,s0) /var/log/ipaupgrade.log -- gen_context(system_u:object_r:ipa_log_t,s0) /var/log/ipatrust-enable-agent.log -- gen_context(system_u:object_r:ipa_log_t,s0) /var/log/ipaepn.log -- gen_context(system_u:object_r:ipa_log_t,s0) /var/log/ipa-custodia.audit.log -- gen_context(system_u:object_r:ipa_log_t,s0) /var/log/ipa-migrate.log -- gen_context(system_u:object_r:ipa_log_t,s0)
Debian platform adoptation has one file different to this list. It should be dealt with by Debian maintainers if they want to use SELinux policies.
PR: https://github.com/freeipa/freeipa/pull/7505
Metadata Update from @frenaud: - Custom field rhbz adjusted to https://issues.redhat.com/browse/RHEL-40376, https://issues.redhat.com/browse/RHEL-47294
master:
ipa-4-12:
Metadata Update from @frenaud: - Issue close_status updated to: fixed - Issue status updated to: Closed (was: Open)