]> git.proxmox.com Git - mirror_lxc.git/commit
lxc-test-usernsexec: If user is root, then create and use non-root user.
authorScott Moser <smoser@brickies.net>
Mon, 1 Jun 2020 16:10:29 +0000 (12:10 -0400)
committerScott Moser <smoser@brickies.net>
Mon, 1 Jun 2020 16:33:58 +0000 (12:33 -0400)
commit4c93c06e9f8ab7845479dfc02cb881a3a031c89b
tree29eb21565e37a8919941e83b317b2e33f3a5a5ac
parenta3ab5b5d1037379dc4f7cf1f4476ecf27b4d7ef0
lxc-test-usernsexec: If user is root, then create and use non-root user.

Previously if the user was root, then the test would just skip
running (and exit 0).  The lxc test environment is run as root.
So, instead of never doing anything there, we create a user,
make sure it is in /etc/sub{ug}id and then execute the test as that
user.

If user is already non-root, then just execute the tests as before.

Signed-off-by: Scott Moser <smoser@brickies.net>
src/tests/lxc-test-usernsexec