d0a06b
require 'selinux'
d0a06b
print "selinux\n"
d0a06b
print "Is selinux enabled? " + Selinux.is_selinux_enabled().to_s + "\n"
d0a06b
print "Is selinux enforce? " + Selinux.security_getenforce().to_s + "\n"
d0a06b
print "Setfscreatecon? " + Selinux.setfscreatecon("system_u:object_r:etc_t:s0").to_s + "\n"
d0a06b
print "/etc -> " + Selinux.matchpathcon("/etc", 0)[1] + "\n"