core: merge the second CapabilityBoundingSet= lines by AND when it is prefixed with...
authoriplayinsun <iplayinsun@gmail.com>
Mon, 4 Sep 2017 03:12:27 +0000 (12:12 +0900)
committerŁukasz Stelmach <l.stelmach@samsung.com>
Mon, 12 Feb 2024 15:37:43 +0000 (16:37 +0100)
commitec7ae22231d1d7614ab9ca163378f7f474e0c1c7
tree8151410a9ca9cd69eaaf84f21d67e58a6ecc8383
parent6a5c7fe284b7409ba4a30a6c8b19c1cde731b77c
core: merge the second CapabilityBoundingSet= lines by AND when it is prefixed with tilde (#6724)

If a unit file contains multiple CapabilityBoundingSet= or
AmbientCapabilities= lines, e.g.,
===
CapabilityBoundingSet=CAP_A CAP_B
CapabilityBoundingSet=~CAP_B CAP_C
===
before this commit, it results all capabilities except CAP_C are set to
CapabilityBoundingSet=, as each lines are always merged by OR.
This commit makes lines prefixed with ~ are merged by AND. So, for the
above example only CAP_A is set.
This makes easier to drop capabilities with drop-in config files.

Signed-off-by: INSUN PYO <insun.pyo@samsung.com>
Change-Id: Ia5c42cfde0f3937f696f858f384387610477c6ea
src/core/load-fragment.c