Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions mantle/kola/tests/misc/selinux.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,15 +180,15 @@ func SelinuxBooleanPersist(c cluster.TestCluster) {
// have it persist across reboots
func SelinuxManage(c cluster.TestCluster) {
cmdList := []cmdCheckOutput{
{"sudo semanage fcontext -l | grep vasd", true, ".*system_u:object_r:var_auth_t:s0"},
{"sudo semanage fcontext -m -t httpd_log_t \"/var/opt/quest/vas/vasd(/.*)?\"", false, ""},
{"sudo semanage fcontext -l | grep vasd", true, ".*system_u:object_r:httpd_log_t:s0"},
{"sudo semanage fcontext -l | grep pam_shield", true, ".*system_u:object_r:var_auth_t:s0"},
{"sudo semanage fcontext -m -t httpd_log_t \"/var/lib/pam_shield(/.*)?\"", false, ""},
{"sudo semanage fcontext -l | grep pam_shield", true, ".*system_u:object_r:httpd_log_t:s0"},
}

m := c.Machines()[0]

testSelinuxCmds(c, m, cmdList)

// the change should be persisted after a reboot
c.AssertCmdOutputMatches(m, "sudo semanage fcontext -l | grep vasd", regexp.MustCompile(".*system_u:object_r:httpd_log_t:s0"))
c.AssertCmdOutputMatches(m, "sudo semanage fcontext -l | grep pam_shield", regexp.MustCompile(".*system_u:object_r:httpd_log_t:s0"))
}
Loading