valeriyvdovin / rpms / systemd

Forked from rpms/systemd 4 years ago
Clone

Blame SOURCES/0431-core-fix-capability-bounding-set-parsing.patch

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