Merge pull request #3164 from rhatdan/apparmor

Don't set apparmor if --priviliged
This commit is contained in:
OpenShift Merge Robot 2019-05-20 17:05:08 +02:00 committed by GitHub
commit 27f9e23a0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -268,7 +268,9 @@ func (config *CreateConfig) createConfigToOCISpec(runtime *libpod.Runtime, userM
// SECURITY OPTS
g.SetProcessNoNewPrivileges(config.NoNewPrivs)
g.SetProcessApparmorProfile(config.ApparmorProfile)
if !config.Privileged {
g.SetProcessApparmorProfile(config.ApparmorProfile)
}
blockAccessToKernelFilesystems(config, &g)