Merge pull request #4900 from lifubang/fix-Personality-seccomp

libct: setup personality before initializing seccomp
This commit is contained in:
Kir Kolyshkin
2025-09-25 16:59:28 -07:00
committed by GitHub
3 changed files with 33 additions and 12 deletions
+18
View File
@@ -62,3 +62,21 @@ function teardown() {
[ "$status" -eq 0 ]
[[ "$output" == *"x86_64"* ]]
}
# check that personality can be set when the personality syscall is blocked by seccomp
@test "runc run with personality syscall blocked by seccomp" {
update_config '
.linux.personality = {
"domain": "LINUX",
}
| .linux.seccomp = {
"defaultAction":"SCMP_ACT_ALLOW",
"syscalls":[{"names":["personality"], "action":"SCMP_ACT_ERRNO"}]
}'
runc run -d --console-socket "$CONSOLE_SOCKET" test_busybox
[ "$status" -eq 0 ]
runc exec test_busybox /bin/sh -c "uname -a"
[ "$status" -eq 0 ]
[[ "$output" == *"x86_64"* ]]
}