diff options
author | Daniel Mack <github@zonque.org> | 2015-11-02 11:45:06 +0100 |
---|---|---|
committer | Daniel Mack <github@zonque.org> | 2015-11-02 11:45:06 +0100 |
commit | cb6762862b1151d06ed856c37b0ebab0796781e3 (patch) | |
tree | 6d574e05b8a663976d9c9f4b93def0977abce7ff /src/test | |
parent | 117b94060da6ec4bacbc2319264bb0f921ce7bf1 (diff) | |
parent | 9ef57298cc57b105c62e2f1dab9ef5837d910604 (diff) |
Merge pull request #1722 from evverx/port-cap-bounding-set-to-extract-first-word
Port capabiliy bounding set parsing to extract_first_word
Diffstat (limited to 'src/test')
-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[]) { |