core: fix capability bounding set parsing
authorEvgeny Vereshchagin <evvers@ya.ru>
Thu, 29 Oct 2015 11:13:04 +0000 (14:13 +0300)
committerEvgeny Vereshchagin <evvers@ya.ru>
Thu, 29 Oct 2015 11:48:37 +0000 (14:48 +0300)
bug: CapabilityBoundingSet= doesn't reset all caps

src/core/load-fragment.c

index 8bd6a67..333fca4 100644 (file)
@@ -1023,7 +1023,7 @@ int config_parse_bounding_set(const char *unit,
                 log_syntax(unit, LOG_ERR, filename, line, 0, "Trailing garbage, ignoring.");
 
         capability_bounding_set = invert ? ~sum : sum;
-        if (*capability_bounding_set_drop)
+        if (*capability_bounding_set_drop && capability_bounding_set)
                 *capability_bounding_set_drop = ~(~*capability_bounding_set_drop | capability_bounding_set);
         else
                 *capability_bounding_set_drop = ~capability_bounding_set;