summaryrefslogtreecommitdiff
path: root/src/basic/virt.h
diff options
context:
space:
mode:
authorChris Down <chris@chrisdown.name>2020-04-14 18:15:04 +0100
committerChris Down <chris@chrisdown.name>2020-04-15 18:36:35 +0100
commit80cc3e3eabd2cf4e31ae3f0d6e2ac7b61d0a1832 (patch)
tree4382f7656e7d6d5b2f894406291207ef0d938eb5 /src/basic/virt.h
parent6ab2e1178e1d98070a2574cea45cb4c0a089f9c0 (diff)
downloadsystemd-80cc3e3eabd2cf4e31ae3f0d6e2ac7b61d0a1832.tar.gz
virt: Detect proot virtualisation by ptrace metadata
proot provides userspace-powered emulation of chroot and mount --bind, lending it to be used on environments without unprivileged user namespaces, or in otherwise restricted environments like Android. In order to achieve this, proot makes use of the kernel's ptrace() facility, which we can use in order to detect its presence. Since it doesn't use any kind of namespacing, including PID namespacing, we don't need to do any tricks when trying to get the tracer's metadata. For our purposes, proot is listed as a "container", since we mostly use this also as the bucket for non-container-but-container-like technologies like WSL. As such, it seems like a good fit for this section as well.
Diffstat (limited to 'src/basic/virt.h')
-rw-r--r--src/basic/virt.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/basic/virt.h b/src/basic/virt.h
index 26f409afd0..d58c582c91 100644
--- a/src/basic/virt.h
+++ b/src/basic/virt.h
@@ -34,6 +34,7 @@ enum {
VIRTUALIZATION_PODMAN,
VIRTUALIZATION_RKT,
VIRTUALIZATION_WSL,
+ VIRTUALIZATION_PROOT,
VIRTUALIZATION_CONTAINER_OTHER,
VIRTUALIZATION_CONTAINER_LAST = VIRTUALIZATION_CONTAINER_OTHER,