mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Move mlock back into the default ungated seccomp profile
Do not gate with CAP_IPC_LOCK as unprivileged use is now
allowed in Linux. This returns it to how it was in 1.11.
Fixes #23587
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
(cherry picked from commit bdf01cf5de
)
This commit is contained in:
parent
d2a9560e71
commit
ad28216987
2 changed files with 30 additions and 18 deletions
|
@ -686,6 +686,21 @@
|
||||||
"action": "SCMP_ACT_ALLOW",
|
"action": "SCMP_ACT_ALLOW",
|
||||||
"args": []
|
"args": []
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "mlock",
|
||||||
|
"action": "SCMP_ACT_ALLOW",
|
||||||
|
"args": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "mlock2",
|
||||||
|
"action": "SCMP_ACT_ALLOW",
|
||||||
|
"args": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "mlockall",
|
||||||
|
"action": "SCMP_ACT_ALLOW",
|
||||||
|
"args": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "mmap",
|
"name": "mmap",
|
||||||
"action": "SCMP_ACT_ALLOW",
|
"action": "SCMP_ACT_ALLOW",
|
||||||
|
|
|
@ -721,6 +721,21 @@ func DefaultProfile(rs *specs.Spec) *types.Seccomp {
|
||||||
Action: types.ActAllow,
|
Action: types.ActAllow,
|
||||||
Args: []*types.Arg{},
|
Args: []*types.Arg{},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
Name: "mlock",
|
||||||
|
Action: types.ActAllow,
|
||||||
|
Args: []*types.Arg{},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Name: "mlock2",
|
||||||
|
Action: types.ActAllow,
|
||||||
|
Args: []*types.Arg{},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Name: "mlockall",
|
||||||
|
Action: types.ActAllow,
|
||||||
|
Args: []*types.Arg{},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
Name: "mmap",
|
Name: "mmap",
|
||||||
Action: types.ActAllow,
|
Action: types.ActAllow,
|
||||||
|
@ -1663,24 +1678,6 @@ func DefaultProfile(rs *specs.Spec) *types.Seccomp {
|
||||||
Args: []*types.Arg{},
|
Args: []*types.Arg{},
|
||||||
},
|
},
|
||||||
}...)
|
}...)
|
||||||
case "CAP_IPC_LOCK":
|
|
||||||
syscalls = append(syscalls, []*types.Syscall{
|
|
||||||
{
|
|
||||||
Name: "mlock",
|
|
||||||
Action: types.ActAllow,
|
|
||||||
Args: []*types.Arg{},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
Name: "mlock2",
|
|
||||||
Action: types.ActAllow,
|
|
||||||
Args: []*types.Arg{},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
Name: "mlockall",
|
|
||||||
Action: types.ActAllow,
|
|
||||||
Args: []*types.Arg{},
|
|
||||||
},
|
|
||||||
}...)
|
|
||||||
case "CAP_SYS_ADMIN":
|
case "CAP_SYS_ADMIN":
|
||||||
capSysAdmin = true
|
capSysAdmin = true
|
||||||
syscalls = append(syscalls, []*types.Syscall{
|
syscalls = append(syscalls, []*types.Syscall{
|
||||||
|
|
Loading…
Add table
Reference in a new issue