summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHelmut Grohne <helmut@subdivi.de>2023-09-28 10:53:53 +0200
committerHelmut Grohne <helmut@subdivi.de>2023-09-28 10:53:53 +0200
commitd43358e86559265d8619b2a2e6d55f435691ce9d (patch)
treee2dbc65820b2ba7542b9ee7b7c76c8b822dd8c4c
parentc63eb6291986dd813a74e76fdccf06900669c957 (diff)
downloaddebvm-d43358e86559265d8619b2a2e6d55f435691ce9d.tar.gz
autopkgtest: contain possible damage by killpg
When mmdebstrap fails, it kills its child processes by killing its process group. This is harmless in many cases. For instance, when run from an interactive shell, the shell creates a process group. When run with user namespaces as non-root, not being root limits the possible damage. But when run as root from autopkgtest, mmdebstrap runs in the initial process group and takes down the entire lxc container. Using setsid, we can isolate the container from this killpg call.
-rw-r--r--debian/tests/control2
1 files changed, 1 insertions, 1 deletions
diff --git a/debian/tests/control b/debian/tests/control
index 9888f95..4b92b4b 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -1,4 +1,4 @@
-Test-Command: ./tests/create-and-run.sh $(dpkg --print-architecture) ""
+Test-Command: setsid ./tests/create-and-run.sh $(dpkg --print-architecture) ""
Depends: debian-archive-keyring, debvm, file, openssh-client, seabios [ppc64el]
Restrictions: allow-stderr, needs-internet, needs-root
# Skip running on armel and armhf as the emulation is too slow there to actually work.