container_create: honor no_new_privs
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
This commit is contained in:
parent
be65303da0
commit
860bc7e21c
1 changed files with 1 additions and 0 deletions
|
@ -737,6 +737,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…
Add table
Add a link
Reference in a new issue