selinux_current_policy_path will return none on a disabled SELinux system
This commit is contained in:
parent
7315245750
commit
5fe159bfdd
|
@ -63,7 +63,7 @@ def parse_options():
|
|||
|
||||
def get_policy():
|
||||
p = selinux.selinux_current_policy_path()
|
||||
if os.path.exists(p):
|
||||
if p and os.path.exists(p):
|
||||
return p
|
||||
i = selinux.security_policyvers()
|
||||
p = selinux.selinux_binary_policy_path() + "." + str(i)
|
||||
|
|
Loading…
Reference in New Issue