|
|
a3e2b5 |
From 1d43806017a0df257fef8ed6f79e12ee69c5bc20 Mon Sep 17 00:00:00 2001
|
|
|
a3e2b5 |
From: Frantisek Sumsal <frantisek@sumsal.cz>
|
|
|
a3e2b5 |
Date: Thu, 8 Nov 2018 09:40:13 +0100
|
|
|
a3e2b5 |
Subject: [PATCH] tests: drop the precondition check for inherited flag
|
|
|
a3e2b5 |
|
|
|
a3e2b5 |
Docker's default capability set has the inherited flag already
|
|
|
a3e2b5 |
set - that breaks tests which expect otherwise. Let's just
|
|
|
a3e2b5 |
drop the check and run the test anyway.
|
|
|
a3e2b5 |
|
|
|
a3e2b5 |
Fixes #10663
|
|
|
a3e2b5 |
|
|
|
a3e2b5 |
Cherry-picked from: c446b8486d9ed18d1bc780948ae9ee8a53fa4c3f
|
|
|
a3e2b5 |
---
|
|
|
a3e2b5 |
src/test/test-capability.c | 8 --------
|
|
|
a3e2b5 |
1 file changed, 8 deletions(-)
|
|
|
a3e2b5 |
|
|
|
a3e2b5 |
diff --git a/src/test/test-capability.c b/src/test/test-capability.c
|
|
|
a3e2b5 |
index af6d808b6d..72975cef94 100644
|
|
|
a3e2b5 |
--- a/src/test/test-capability.c
|
|
|
a3e2b5 |
+++ b/src/test/test-capability.c
|
|
|
a3e2b5 |
@@ -180,8 +180,6 @@ static void test_update_inherited_set(void) {
|
|
|
a3e2b5 |
|
|
|
a3e2b5 |
caps = cap_get_proc();
|
|
|
a3e2b5 |
assert_se(caps);
|
|
|
a3e2b5 |
- assert_se(!cap_get_flag(caps, CAP_CHOWN, CAP_INHERITABLE, &fv));
|
|
|
a3e2b5 |
- assert(fv == CAP_CLEAR);
|
|
|
a3e2b5 |
|
|
|
a3e2b5 |
set = (UINT64_C(1) << CAP_CHOWN);
|
|
|
a3e2b5 |
|
|
|
a3e2b5 |
@@ -197,12 +195,6 @@ static void test_set_ambient_caps(void) {
|
|
|
a3e2b5 |
uint64_t set = 0;
|
|
|
a3e2b5 |
cap_flag_value_t fv;
|
|
|
a3e2b5 |
|
|
|
a3e2b5 |
- caps = cap_get_proc();
|
|
|
a3e2b5 |
- assert_se(caps);
|
|
|
a3e2b5 |
- assert_se(!cap_get_flag(caps, CAP_CHOWN, CAP_INHERITABLE, &fv));
|
|
|
a3e2b5 |
- assert(fv == CAP_CLEAR);
|
|
|
a3e2b5 |
- cap_free(caps);
|
|
|
a3e2b5 |
-
|
|
|
a3e2b5 |
assert_se(prctl(PR_CAP_AMBIENT, PR_CAP_AMBIENT_IS_SET, CAP_CHOWN, 0, 0) == 0);
|
|
|
a3e2b5 |
|
|
|
a3e2b5 |
set = (UINT64_C(1) << CAP_CHOWN);
|