f65af0
From 8ba1a1e89b34e587a9898a85f1c545dbd1c7765a Mon Sep 17 00:00:00 2001
f65af0
From: Christian Heimes <cheimes@redhat.com>
f65af0
Date: Fri, 22 Jun 2018 12:22:06 +0200
f65af0
Subject: [PATCH] Always make ipa.p11-kit world-readable
f65af0
f65af0
Ensure that ipa.p11-kit is always world-readable.
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
 ipaplatform/redhat/tasks.py | 1 +
f65af0
 1 file changed, 1 insertion(+)
f65af0
f65af0
diff --git a/ipaplatform/redhat/tasks.py b/ipaplatform/redhat/tasks.py
f65af0
index 6a4270defc9f444f76677bdf08d2a680649664bb..8fc8b54c146d540c988d97b7fb0927fced7c3e29 100644
f65af0
--- a/ipaplatform/redhat/tasks.py
f65af0
+++ b/ipaplatform/redhat/tasks.py
f65af0
@@ -269,6 +269,7 @@ class RedHatTaskNamespace(BaseTaskNamespace):
f65af0
 
f65af0
         try:
f65af0
             f = open(new_cacert_path, 'w')
f65af0
+            os.fchmod(f.fileno(), 0o644)
f65af0
         except IOError as e:
f65af0
             logger.info("Failed to open %s: %s", new_cacert_path, e)
f65af0
             return False
f65af0
-- 
f65af0
2.17.1
f65af0