Page MenuHomePhorge

D85.1775282106.diff
No OneTemporary

Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None

D85.1775282106.diff

diff --git a/pykolab/setup/__init__.py b/pykolab/setup/__init__.py
--- a/pykolab/setup/__init__.py
+++ b/pykolab/setup/__init__.py
@@ -40,6 +40,25 @@
to_execute.append(sys.argv[arg_num].replace('-','_'))
def run(self):
+ if os.path.isfile('/sys/fs/selinux/enforce'):
+ if os.access('/sys/fs/selinux/enforce', os.R_OK):
+ # Set a gentle default because strictly speaking,
+ # setup won't fail (run-time does)
+ enforce = "0"
+
+ with open('/sys/fs/selinux/enforce', 'r') as f:
+ enforce = f.read()
+
+ if enforce.strip() == "1":
+ log.error(_("SELinux currently enforcing. Read https://docs.kolab.org/installation-guide/preparing-the-system.html#selinux"))
+
+ if os.path.isfile('/etc/selinux/config'):
+ if os.access('/etc/selinux/config', os.R_OK):
+ with open('/etc/selinux/config', 'r') as f:
+ for line in f:
+ if line.strip() == "SELINUX=enforcing":
+ log.error(_("SELinux configured to enforce a policy on startup. Read https://docs.kolab.org/installation-guide/preparing-the-system.html#selinux"))
+
components.execute('_'.join(to_execute))
if os.path.exists('/tmp/kolab-setup-my.cnf'):

File Metadata

Mime Type
text/plain
Expires
Sat, Apr 4, 5:55 AM (4 h, 53 m ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18828297
Default Alt Text
D85.1775282106.diff (1 KB)

Event Timeline