]> git.ipfire.org Git - thirdparty/systemd.git/commit
test-execute: skip tests that are broken without unprivileged userns 31003/head
authorNick Rosbrook <enr0n@ubuntu.com>
Thu, 18 Jan 2024 20:49:42 +0000 (15:49 -0500)
committerNick Rosbrook <enr0n@ubuntu.com>
Tue, 23 Jan 2024 19:19:56 +0000 (14:19 -0500)
commitd0c6136f5130ee5baa561e3af5a3b53719588dcf
tree87243448615fec87848b8e830f141aedfb3ebfdd
parent6327d3022452c3c2ad408fbee9cdfbc2120753c9
test-execute: skip tests that are broken without unprivileged userns

With newer versions of AppArmor, unprivileged user namespace creation
may be restricted by default, in which case user manager instances will
not be able to apply PrivateUsers=yes (or the settings which require it).
Additionally, if a kernel has the kernel.unprivileged_userns_clone
sysctl patch, and that sysctl is 0, then unprivileged userns creation
will always fail.

If a test unit is going to be run in a user manager, and that unit
requires PrivateUsers=yes (explicitly or implicitly), then skip it if
we do not have user namespace privileges.
src/test/test-execute.c