wrap check for selinux enforcing in a try except
Signed-off-by: Dennis Gilmore <dennis@ausil.us>
This commit is contained in:
parent
e8f4b7334e
commit
11a80ddbda
@ -30,7 +30,11 @@ def main():
|
||||
return 1
|
||||
|
||||
if opts.do_all or opts.do_buildinstall:
|
||||
enforcing = selinux.security_getenforce()
|
||||
try:
|
||||
enforcing = selinux.security_getenforce()
|
||||
except:
|
||||
print >> sys.stdout, "INFO: selinux disabled"
|
||||
enforcing = False
|
||||
if enforcing:
|
||||
print >> sys.stdout, "WARNING: SELinux is enforcing. This may lead to a compose with selinux disabled."
|
||||
print >> sys.stdout, "Consider running with setenforce 0."
|
||||
|
Loading…
Reference in New Issue
Block a user