summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-10-22 02:02:17 +0200
committerLennart Poettering <lennart@poettering.net>2015-10-22 02:02:17 +0200
commitb0830e21f47109d8a6ba2fc0afbf9b2ca1ffc2a9 (patch)
tree7c829225b5cb156088404542d81c45b0b93cfdb6 /src/core
parent16fb773ee33a5b4e85605bf18a0572bead1b8224 (diff)
core: check parsed bus msg in full before applying it
Diffstat (limited to 'src/core')
-rw-r--r--src/core/dbus-execute.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/core/dbus-execute.c b/src/core/dbus-execute.c
index 6712b86232..b8da66c985 100644
--- a/src/core/dbus-execute.c
+++ b/src/core/dbus-execute.c
@@ -1173,7 +1173,6 @@ int bus_exec_context_set_transient_property(
unit_write_drop_in_private_format(u, mode, name, "Environment=%s\n", joined);
}
-
}
return 1;
@@ -1262,6 +1261,10 @@ int bus_exec_context_set_transient_property(
if (r < 0)
return r;
+ r = sd_bus_message_exit_container(message);
+ if (r < 0)
+ return r;
+
r = fflush_and_check(f);
if (r < 0)
return r;
@@ -1279,10 +1282,6 @@ int bus_exec_context_set_transient_property(
}
}
- r = sd_bus_message_exit_container(message);
- if (r < 0)
- return r;
-
return 1;
} else if (STR_IN_SET(name, "ReadWriteDirectories", "ReadOnlyDirectories", "InaccessibleDirectories")) {