daandemeyer / rpms / systemd

Forked from rpms/systemd 2 years ago
Clone
923a60
From 13b70c13553c94c444f149bd086bd3e8d9cc39b6 Mon Sep 17 00:00:00 2001
923a60
From: Evgeny Vereshchagin <evvers@ya.ru>
923a60
Date: Thu, 29 Oct 2015 14:13:04 +0300
923a60
Subject: [PATCH] core: fix capability bounding set parsing
923a60
923a60
bug: CapabilityBoundingSet= doesn't reset all caps
923a60
923a60
Cherry-picked from: 661b37b
923a60
Resolves: #1409586
923a60
---
923a60
 src/core/load-fragment.c | 2 +-
923a60
 1 file changed, 1 insertion(+), 1 deletion(-)
923a60
923a60
diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c
923a60
index 90d42b002f..7056419715 100644
923a60
--- a/src/core/load-fragment.c
923a60
+++ b/src/core/load-fragment.c
923a60
@@ -1069,7 +1069,7 @@ int config_parse_bounding_set(const char *unit,
923a60
                            "Trailing garbage, ignoring.");
923a60
 
923a60
         capability_bounding_set = invert ? ~sum : sum;
923a60
-        if (*capability_bounding_set_drop)
923a60
+        if (*capability_bounding_set_drop && capability_bounding_set)
923a60
                 *capability_bounding_set_drop = ~(~*capability_bounding_set_drop | capability_bounding_set);
923a60
         else
923a60
                 *capability_bounding_set_drop = ~capability_bounding_set;