mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
seccomp: allow specifying a custom profile with --privileged
`--privileged --security-opt seccomp=<CUSTOM.json>` was ignoring `<CUSTOM.json>`. Fix issue 47499 Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
This commit is contained in:
@@ -22,7 +22,11 @@ func WithSeccomp(daemon *Daemon, c *container.Container) coci.SpecOpts {
|
||||
return nil
|
||||
}
|
||||
if c.HostConfig.Privileged {
|
||||
return nil
|
||||
var err error
|
||||
if c.SeccompProfile != "" {
|
||||
s.Linux.Seccomp, err = seccomp.LoadProfile(c.SeccompProfile, s)
|
||||
}
|
||||
return err
|
||||
}
|
||||
if !daemon.RawSysInfo().Seccomp {
|
||||
if c.SeccompProfile != "" && c.SeccompProfile != dconfig.SeccompProfileDefault {
|
||||
|
||||
Reference in New Issue
Block a user