expanded on scenarios

This commit is contained in:
Marius Pana 2018-06-12 17:12:17 +03:00
parent 528fba1b6a
commit 4a1e661467
1 changed files with 6 additions and 2 deletions

View File

@ -19,9 +19,13 @@ def check_selinux(item, params, info):
if line[0] == 'disabled':
state = params["modedisabled"]
return (state, "SELinux is disabled")
elif line[0] == 'enabled' and line[1] == "permissive" and line[2] == "enforcing":
elif line[1] == "enforcing" and line[2] == "enforcing":
return(state, "SELinux is enabled and enforcing.")
elif line[1] == "enforcing" and line[2] == "permissive":
return(state, "SELinux is enforcing but config file is in permissive mode.")
elif line[1] == "permissive" and line[2] == "enforcing":
state = params["curmodepermissive"]
return (state, "SELinux is in permissive mode but config file is enfocring.")
return (state, "SELinux is in permissive mode but config file is enforcing.")
elif line[2] == "permissive":
state = params["filemodepermissive"]
return (state, "SELinux is in permissive mode.")