Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F117764244
D85.1775222670.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
D85.1775222670.diff
View Options
diff --git a/pykolab/setup/__init__.py b/pykolab/setup/__init__.py
--- a/pykolab/setup/__init__.py
+++ b/pykolab/setup/__init__.py
@@ -21,6 +21,7 @@
import sys
import pykolab
+from pykolab.translate import _
log = pykolab.getLogger('pykolab.setup')
conf = pykolab.getConf()
@@ -40,6 +41,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'):
diff --git a/setup-kolab.py b/setup-kolab.py
--- a/setup-kolab.py
+++ b/setup-kolab.py
@@ -29,6 +29,7 @@
import pykolab
from pykolab.setup import Setup
+from pykolab.translate import _
try:
from pykolab.constants import *
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Apr 3, 1:24 PM (3 h, 43 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18824216
Default Alt Text
D85.1775222670.diff (1 KB)
Attached To
Mode
D85: Check the current status of SELinux, and the configuration for the next system cycle
Attached
Detach File
Event Timeline