diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-10-27 17:09:05 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-10-27 17:09:05 +0100 |
commit | 64529a2921a8972878b3f953935f286ce77914e0 (patch) | |
tree | ea3b13652c593269d5c8fa2b67b9904c38edda22 /src/core | |
parent | 0d0696812980d8f41c54739ad73716a233a2fa7c (diff) | |
parent | b9d345b53ff0ee402c9dceee1bc14bf0d8907706 (diff) |
Merge pull request #1695 from evverx/fix-cap-bounding-merging
core: fix CapabilityBoundingSet merging
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 ecfdb80deb..8bd6a67538 100644 --- a/src/core/load-fragment.c +++ b/src/core/load-fragment.c @@ -982,6 +982,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; @@ -1021,10 +1022,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; } |