Merge pull request #619 from rhatdan/relabel

Fix relabel to allow volume mounting of /
This commit is contained in:
Mrunal Patel 2015-06-09 13:46:39 -07:00
commit 4369703200
1 changed files with 3 additions and 3 deletions

View File

@ -105,14 +105,14 @@ func Relabel(path string, fileLabel string, relabel string) error {
if fileLabel == "" {
return nil
}
if !strings.ContainsAny(relabel, "zZ") {
return nil
}
for _, p := range exclude_path {
if path == p {
return fmt.Errorf("Relabeling of %s is not allowed", path)
}
}
if !strings.ContainsAny(relabel, "zZ") {
return nil
}
if strings.Contains(relabel, "z") && strings.Contains(relabel, "Z") {
return fmt.Errorf("Bad SELinux option z and Z can not be used together")
}