diff options
author | Evgeny Vereshchagin <evvers@ya.ru> | 2015-10-27 14:40:28 +0300 |
---|---|---|
committer | Evgeny Vereshchagin <evvers@ya.ru> | 2015-10-27 14:42:49 +0300 |
commit | b9d345b53ff0ee402c9dceee1bc14bf0d8907706 (patch) | |
tree | 1e34a1cf05b0fc687c564f07905a88785c8ee12e /src/core | |
parent | f47fc3ffc4b69a00083a76308f777b52afb8efbf (diff) |
core: fix CapabilityBoundingSet merging
Fixes: #1221
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/load-fragment.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c index 31fdc48823..6fa506bd6c 100644 --- a/src/core/load-fragment.c +++ b/src/core/load-fragment.c @@ -976,6 +976,7 @@ int config_parse_bounding_set(const char *unit, void *userdata) { uint64_t *capability_bounding_set_drop = data; + uint64_t capability_bounding_set; const char *word, *state; size_t l; bool invert = false; @@ -1015,10 +1016,11 @@ int config_parse_bounding_set(const char *unit, if (!isempty(state)) log_syntax(unit, LOG_ERR, filename, line, 0, "Trailing garbage, ignoring."); - if (invert) - *capability_bounding_set_drop |= sum; + capability_bounding_set = invert ? ~sum : sum; + if (*capability_bounding_set_drop) + *capability_bounding_set_drop = ~(~*capability_bounding_set_drop | capability_bounding_set); else - *capability_bounding_set_drop |= ~sum; + *capability_bounding_set_drop = ~capability_bounding_set; return 0; } |