Don't set apparmor if --priviliged

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
Daniel J Walsh 2019-05-20 09:11:12 -04:00
parent a83edf23ac
commit db218e7162
No known key found for this signature in database
GPG Key ID: A2DF901DABE2C028
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)