mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
httpinstance: Restore SELinux context of session_dir /etc/httpd/alias
The session directory /etc/httpd/alias/ could be created with the wrong
SELinux context. Therefore httpd was not able to write to this directory.
Fixes: https://pagure.io/freeipa/issue/7662
Related-to: 49b4a057f1 (Create missing
/etc/httpd/alias for ipasession.key)
Reviewed-By: Christian Heimes <cheimes@redhat.com>
This commit is contained in:
@@ -183,6 +183,9 @@ class HTTPInstance(service.Service):
|
||||
os.makedirs(session_dir)
|
||||
# Must be world-readable / executable
|
||||
os.chmod(session_dir, 0o755)
|
||||
# Restore SELinux context of session_dir /etc/httpd/alias, see
|
||||
# https://pagure.io/freeipa/issue/7662
|
||||
tasks.restore_context(session_dir)
|
||||
|
||||
target_fname = paths.HTTPD_IPA_CONF
|
||||
http_txt = ipautil.template_file(
|
||||
|
||||
Reference in New Issue
Block a user