diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-10-20 23:41:21 -0400 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2017-07-05 08:50:55 +0200 |
commit | 70cec624a0e54f3c35aff781645b07452fc32596 (patch) | |
tree | a088cea6dbdd3125fcc1070f1bc4c478534f69d5 /src/basic/proc-cmdline.c | |
parent | fb3aeda07e139f87c787fab2e2d0bd8bf97aa3a5 (diff) |
detect-virt: add --private-users switch to check if a userns is active
Various things don't work when we're running in a user namespace, but it's
pretty hard to reliably detect if that is true.
A function is added which looks at /proc/self/uid_map and returns false
if the default "0 0 UINT32_MAX" is found, and true if it finds anything else.
This misses the case where an 1:1 mapping with the full range was used, but
I don't know how to distinguish this case.
'elogind-detect-virt --private-users' is very similar to
'elogind-detect-virt --chroot', but we check for a user namespace instead.
Diffstat (limited to 'src/basic/proc-cmdline.c')
0 files changed, 0 insertions, 0 deletions