d0a06b2c34
Handle duplicate file context regexes as a fatal error from Stephen Smalley. This prevents adding them via semanage. Fix audit2why shadowed variables from Stephen Smalley. Note that freecon NULL is legal in man page from Karel Zak.
7 lines
334 B
Ruby
7 lines
334 B
Ruby
require 'selinux'
|
|
print "selinux\n"
|
|
print "Is selinux enabled? " + Selinux.is_selinux_enabled().to_s + "\n"
|
|
print "Is selinux enforce? " + Selinux.security_getenforce().to_s + "\n"
|
|
print "Setfscreatecon? " + Selinux.setfscreatecon("system_u:object_r:etc_t:s0").to_s + "\n"
|
|
print "/etc -> " + Selinux.matchpathcon("/etc", 0)[1] + "\n"
|