diff options
author | Luca Boccassi <luca.boccassi@gmail.com> | 2024-11-21 01:47:39 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2024-11-23 00:14:20 +0100 |
commit | 193bf42ab0721384570bb6913e5f38385a9105e7 (patch) | |
tree | 2dfc120887550aa11e149d709caf8576c35032ef /src/nspawn | |
parent | namespace-util: add generic namespace_is_init() call (diff) | |
download | systemd-193bf42ab0721384570bb6913e5f38385a9105e7.tar.xz systemd-193bf42ab0721384570bb6913e5f38385a9105e7.zip |
detect-virt: check the inode number of the pid namespace
The indoe number of root pid namespace is hardcoded in the kernel to
0xEFFFFFFC since 3.8, so check the inode number of our pid namespace
if all else fails. If it's not 0xEFFFFFFC then we are in a pid
namespace, hence a container environment.
Fixes https://github.com/systemd/systemd/issues/35249
[Reworked by Lennart, to make use of namespace_is_init()]
Diffstat (limited to 'src/nspawn')
0 files changed, 0 insertions, 0 deletions