/usr/sbin/check-selinux-installation is in selinux-basics 0.5.2.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | #! /usr/bin/python
import os, glob
testsdir="/usr/share/selinux-basics/tests"
tests = []
def register_test(test):
tests.append(test)
class ErrorBase:
def __str__(self):
raise NotImplementedError("Error with no description found. Class: %s" % self.__class__)
def fixable(self):
return False
def fix(self):
return False
class TestBase:
@staticmethod
def test():
return []
def fix():
pass
testfiles = glob.glob(os.path.join(testsdir,"[0-9]*.py"))
testfiles.sort()
for testfile in testfiles:
execfile(testfile)
results = []
for test in tests:
results += test.test()
for result in results:
print result
|