container_create: honor no_new_privs
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
This commit is contained in:
parent
91d9b4fc29
commit
e41ba62b19
1 changed files with 1 additions and 0 deletions
|
@ -770,6 +770,7 @@ func (s *Server) createSandboxContainer(ctx context.Context, containerID string,
|
||||||
}
|
}
|
||||||
specgen.SetProcessSelinuxLabel(processLabel)
|
specgen.SetProcessSelinuxLabel(processLabel)
|
||||||
specgen.SetLinuxMountLabel(mountLabel)
|
specgen.SetLinuxMountLabel(mountLabel)
|
||||||
|
specgen.SetProcessNoNewPrivileges(linux.GetSecurityContext().GetNoNewPrivs())
|
||||||
|
|
||||||
if containerConfig.GetLinux().GetSecurityContext() != nil &&
|
if containerConfig.GetLinux().GetSecurityContext() != nil &&
|
||||||
!containerConfig.GetLinux().GetSecurityContext().Privileged {
|
!containerConfig.GetLinux().GetSecurityContext().Privileged {
|
||||||
|
|
Loading…
Reference in a new issue