mirror of https://github.com/containers/podman.git
apparmor: respect "unconfined" setting
The "unconfined" profile must be treated specially to turn off apparmor confinement and to avoid applying any other profile. Signed-off-by: Valentin Rothberg <vrothberg@suse.com> Closes: #1241 Approved by: mheon
This commit is contained in:
parent
e9b23f7cca
commit
4c63fcc59a
|
@ -231,7 +231,7 @@ func parseSecurityOpt(config *cc.CreateConfig, securityOpts []string) error {
|
||||||
logrus.Infof("Sucessfully loaded AppAmor profile '%s'", profile)
|
logrus.Infof("Sucessfully loaded AppAmor profile '%s'", profile)
|
||||||
config.ApparmorProfile = profile
|
config.ApparmorProfile = profile
|
||||||
}
|
}
|
||||||
} else if config.ApparmorProfile != "" {
|
} else if config.ApparmorProfile != "" && config.ApparmorProfile != "unconfined" {
|
||||||
if !apparmor.IsEnabled() {
|
if !apparmor.IsEnabled() {
|
||||||
return fmt.Errorf("profile specified but AppArmor is disabled on the host")
|
return fmt.Errorf("profile specified but AppArmor is disabled on the host")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue