summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-03-22 23:25:54 +0100
committerLennart Poettering <lennart@poettering.net>2013-03-22 23:28:44 +0100
commitd91c34f21ff7445dcee3efe2368aebe2d6c266db (patch)
tree8b7099d7bc80f6cdb5c9b5be441b6e1cbb0497fd /src
parent6af274272a917710f606acb3589f0430e9092631 (diff)
exec: Assigning the empty string to CapabilityBoundSet= should drop all caps
Previously, it would set all caps, but it should drop them all, anything else makes little sense. Also, document that this works as it does, and what to do in order to assign all caps to the bounding set. https://bugzilla.redhat.com/show_bug.cgi?id=914705
Diffstat (limited to 'src')
-rw-r--r--src/core/load-fragment.c6
-rw-r--r--src/core/unit.c9
2 files changed, 8 insertions, 7 deletions
diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c
index 2204c67a4b..6d90428af0 100644
--- a/src/core/load-fragment.c
+++ b/src/core/load-fragment.c
@@ -889,12 +889,6 @@ int config_parse_bounding_set(
assert(rvalue);
assert(data);
- if (isempty(rvalue)) {
- /* An empty assignment resets */
- *capability_bounding_set_drop = 0;
- return 0;
- }
-
if (rvalue[0] == '~') {
invert = true;
rvalue++;
diff --git a/src/core/unit.c b/src/core/unit.c
index a1249dc093..d43558e6df 100644
--- a/src/core/unit.c
+++ b/src/core/unit.c
@@ -2645,7 +2645,14 @@ int unit_kill(Unit *u, KillWho w, int signo, DBusError *error) {
return UNIT_VTABLE(u)->kill(u, w, signo, error);
}
-int unit_kill_common(Unit *u, KillWho who, int signo, pid_t main_pid, pid_t control_pid, DBusError *error) {
+int unit_kill_common(
+ Unit *u,
+ KillWho who,
+ int signo,
+ pid_t main_pid,
+ pid_t control_pid,
+ DBusError *error) {
+
int r = 0;
if (who == KILL_MAIN && main_pid <= 0) {