Bump github.com/opencontainers/selinux from 1.8.0 to 1.8.1

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
This commit is contained in:
Davanum Srinivas
2021-05-18 11:04:27 -04:00
parent 49321a12df
commit 1093f05ab2
8 changed files with 25 additions and 13 deletions

View File

@@ -892,13 +892,13 @@ func openContextFile() (*os.File, error) {
return os.Open(lxcPath)
}
var labels = loadLabels()
var labels, privContainerMountLabel = loadLabels()
func loadLabels() map[string]string {
func loadLabels() (map[string]string, string) {
labels := make(map[string]string)
in, err := openContextFile()
if err != nil {
return labels
return labels, ""
}
defer in.Close()
@@ -920,7 +920,10 @@ func loadLabels() map[string]string {
}
}
return labels
con, _ := NewContext(labels["file"])
con["level"] = fmt.Sprintf("s0:c%d,c%d", maxCategory-2, maxCategory-1)
reserveLabel(con.get())
return labels, con.get()
}
// kvmContainerLabels returns the default processLabel and mountLabel to be used