only run test_unshare_userns() if not root user
This commit is contained in:
parent
dfbf9cdcef
commit
ea82b267c9
1 changed files with 1 additions and 1 deletions
|
@ -4239,7 +4239,7 @@ sub main() {
|
|||
# lxc-usernsexec -- lxc-unshare -s 'MOUNT|PID|UTSNAME|IPC' ...
|
||||
# but without needing lxc
|
||||
if ($ARGV[0] eq "--unshare-helper") {
|
||||
if (!test_unshare_userns(1)) {
|
||||
if ($EFFECTIVE_USER_ID != 0 && !test_unshare_userns(1)) {
|
||||
exit 1;
|
||||
}
|
||||
my @idmap = read_subuid_subgid;
|
||||
|
|
Loading…
Reference in a new issue