Merge pull request #11179 from rhatdan/selinux-fixes

Two SELinux Changes.
This commit is contained in:
Michael Crosby 2015-03-05 12:19:10 -08:00
commit 78989424bc
2 changed files with 1 additions and 8 deletions

View file

@ -47,7 +47,7 @@ func (d *Driver) Create(id, parent string) error {
}
opts := []string{"level:s0"}
if _, mountLabel, err := label.InitLabels(opts); err == nil {
label.Relabel(dir, mountLabel, "")
label.SetFileLabel(dir, mountLabel)
}
if parent == "" {
return nil

View file

@ -15,7 +15,6 @@ import (
"github.com/docker/docker/pkg/chrootarchive"
"github.com/docker/docker/pkg/symlink"
"github.com/docker/docker/volumes"
"github.com/docker/libcontainer/label"
)
type Mount struct {
@ -344,12 +343,6 @@ func (container *Container) setupMounts() error {
mounts = append(mounts, execdriver.Mount{Source: container.HostsPath, Destination: "/etc/hosts", Writable: true, Private: true})
}
for _, m := range mounts {
if err := label.SetFileLabel(m.Source, container.MountLabel); err != nil {
return err
}
}
container.command.Mounts = mounts
return nil
}