diff options
author | Evgeny Vereshchagin <evvers@ya.ru> | 2015-10-30 09:22:53 +0300 |
---|---|---|
committer | Evgeny Vereshchagin <evvers@ya.ru> | 2015-10-30 09:22:53 +0300 |
commit | 4b03af4a97b959e1220f1e7c92cc40bf2ebc5169 (patch) | |
tree | 25c5b4996b260e5d0ac0e197a5915bca88f9f9b4 /src/test/test-unit-file.c | |
parent | 8d20def9fee8893d30d25ee38eb9d84323328fad (diff) |
tests: add test for capability bounding set parsing
Diffstat (limited to 'src/test/test-unit-file.c')
-rw-r--r-- | src/test/test-unit-file.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/test/test-unit-file.c b/src/test/test-unit-file.c index a2ca391e1a..f9107e0d0d 100644 --- a/src/test/test-unit-file.c +++ b/src/test/test-unit-file.c @@ -672,6 +672,13 @@ static void test_config_parse_bounding_set(void) { &capability_bounding_set_drop, NULL); assert_se(r >= 0); assert_se(capability_bounding_set_drop == (uint64_t) 0ULL); + + capability_bounding_set_drop = 0; + r = config_parse_bounding_set(NULL, "fake", 1, "section", 1, + "CapabilityBoundingSet", 0, " 'CAP_NET_RAW' WAT_CAP??? CAP_NET_ADMIN CAP'_trailing_garbage", + &capability_bounding_set_drop, NULL); + assert_se(r >= 0); + assert_se(capability_bounding_set_drop == ~(make_cap(CAP_NET_RAW) | make_cap(CAP_NET_ADMIN))); } int main(int argc, char *argv[]) { |