mirror of https://github.com/docker/docs.git
Merge pull request #8181 from rhatdan/selinux_btrfs
--selinux-enabled flag should be ignored on Disabled SELinux systems
This commit is contained in:
commit
f2bc723bc6
|
@ -775,7 +775,7 @@ func NewDaemonFromDirectory(config *Config, eng *engine.Engine) (*Daemon, error)
|
||||||
log.Debugf("Using graph driver %s", driver)
|
log.Debugf("Using graph driver %s", driver)
|
||||||
|
|
||||||
// As Docker on btrfs and SELinux are incompatible at present, error on both being enabled
|
// As Docker on btrfs and SELinux are incompatible at present, error on both being enabled
|
||||||
if config.EnableSelinuxSupport && driver.String() == "btrfs" {
|
if selinuxEnabled() && config.EnableSelinuxSupport && driver.String() == "btrfs" {
|
||||||
return nil, fmt.Errorf("SELinux is not supported with the BTRFS graph driver!")
|
return nil, fmt.Errorf("SELinux is not supported with the BTRFS graph driver!")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,3 +11,7 @@ func selinuxSetDisabled() {
|
||||||
func selinuxFreeLxcContexts(label string) {
|
func selinuxFreeLxcContexts(label string) {
|
||||||
selinux.FreeLxcContexts(label)
|
selinux.FreeLxcContexts(label)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func selinuxEnabled() bool {
|
||||||
|
return selinux.SelinuxEnabled()
|
||||||
|
}
|
||||||
|
|
|
@ -7,3 +7,7 @@ func selinuxSetDisabled() {
|
||||||
|
|
||||||
func selinuxFreeLxcContexts(label string) {
|
func selinuxFreeLxcContexts(label string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func selinuxEnabled() bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue