1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-02 10:51:20 +03:00

test-execute: fix execution of AmbientCapabilities tests

Wrong tests were executed
This commit is contained in:
Ronny Chevalier 2016-03-21 18:40:07 +01:00
parent e31512b1c9
commit 34f5ff465f

View File

@ -252,10 +252,11 @@ static void test_exec_capabilityambientset(Manager *m) {
r = prctl(PR_CAP_AMBIENT, PR_CAP_AMBIENT_CLEAR_ALL, 0, 0, 0);
if (r >= 0 || errno != EINVAL) {
if (getpwnam("nobody")) {
test(m, "exec-runtimedirectory-owner.service", 0, CLD_EXITED);
} else if (getpwnam("nfsnobody")) {
test(m, "exec-capabilityambientset.service", 0, CLD_EXITED);
test(m, "exec-capabilityambientset-merge.service", 0, CLD_EXITED);
} else if (getpwnam("nfsnobody")) {
test(m, "exec-capabilityambientset-nfsnobody.service", 0, CLD_EXITED);
test(m, "exec-capabilityambientset-merge-nfsnobody.service", 0, CLD_EXITED);
} else
log_error_errno(errno, "Skipping test_exec_capabilityambientset, could not find nobody/nfsnobody user: %m");
} else