pgreco / rpms / ipa

Forked from forks/areguera/rpms/ipa 4 years ago
Clone

Blame SOURCES/0044-Make-etc-httpd-alias-world-readable-executable.patch

f65af0
From 9bb9255161eef8da54842c0a6aeb1ddb0b20c0df Mon Sep 17 00:00:00 2001
f65af0
From: Christian Heimes <cheimes@redhat.com>
f65af0
Date: Fri, 22 Jun 2018 12:25:33 +0200
f65af0
Subject: [PATCH] Make /etc/httpd/alias world readable & executable
f65af0
f65af0
The directory /etc/httpd/alias contains public key material. It must be
f65af0
world readable and executable, so any client can read public certs.
f65af0
f65af0
Note: executable for a directory means, that a process is allowed to
f65af0
traverse into the directory.
f65af0
f65af0
Fixes: https://pagure.io/freeipa/issue/7594
f65af0
Signed-off-by: Christian Heimes <cheimes@redhat.com>
f65af0
Reviewed-By: Tibor Dudlak <tdudlak@redhat.com>
f65af0
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
f65af0
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
f65af0
---
f65af0
 ipaserver/install/httpinstance.py | 3 +++
f65af0
 1 file changed, 3 insertions(+)
f65af0
f65af0
diff --git a/ipaserver/install/httpinstance.py b/ipaserver/install/httpinstance.py
f65af0
index 05b88998353597aebc39b6dad5e1a688dca84f49..3f8b18c4e8412c1767b6ad541da18d8b30ad59f7 100644
f65af0
--- a/ipaserver/install/httpinstance.py
f65af0
+++ b/ipaserver/install/httpinstance.py
f65af0
@@ -217,6 +217,9 @@ class HTTPInstance(service.Service):
f65af0
         self.update_httpd_service_ipa_conf()
f65af0
         self.update_httpd_wsgi_conf()
f65af0
 
f65af0
+        # Must be world-readable / executable
f65af0
+        os.chmod(paths.HTTPD_ALIAS_DIR, 0o755)
f65af0
+
f65af0
         target_fname = paths.HTTPD_IPA_CONF
f65af0
         http_txt = ipautil.template_file(
f65af0
             os.path.join(paths.USR_SHARE_IPA_DIR, "ipa.conf"), self.sub_dict)
f65af0
-- 
f65af0
2.17.1
f65af0