summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Mack <github@zonque.org>2015-08-04 14:23:17 +0200
committerDaniel Mack <github@zonque.org>2015-08-04 14:23:17 +0200
commit5977db2a3acd86214ad214fe692fd354f46c5955 (patch)
tree214104ed6fe019d704a7b8b5e75b7987ef5069f3 /src
parent13925e4ce87415d71598b81a71639b3032c0b0d3 (diff)
parentc7d38b859daad5144741c41378f468c8878c3908 (diff)
Merge pull request #858 from dvdhrm/proxy-env
bus-proxy: discard invalid environment updates
Diffstat (limited to 'src')
-rw-r--r--src/bus-proxyd/driver.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/bus-proxyd/driver.c b/src/bus-proxyd/driver.c
index 951f515808..fa4aee691a 100644
--- a/src/bus-proxyd/driver.c
+++ b/src/bus-proxyd/driver.c
@@ -35,6 +35,7 @@
#include "driver.h"
#include "proxy.h"
#include "synthesize.h"
+#include "env-util.h"
static int get_creds_by_name(sd_bus *bus, const char *name, uint64_t mask, sd_bus_creds **_creds, sd_bus_error *error) {
_cleanup_bus_creds_unref_ sd_bus_creds *c = NULL;
@@ -694,9 +695,13 @@ int bus_proxy_process_driver(Proxy *p, sd_bus *a, sd_bus *b, sd_bus_message *m,
if (!s)
return synthetic_reply_method_errno(m, -ENOMEM, NULL);
- r = strv_extend(&args, s);
- if (r < 0)
- return synthetic_reply_method_errno(m, r, NULL);
+ if (!env_assignment_is_valid(s)) {
+ log_warning("UpdateActivationEnvironment() called with invalid assignment, discarding: %s", s);
+ } else {
+ r = strv_extend(&args, s);
+ if (r < 0)
+ return synthetic_reply_method_errno(m, r, NULL);
+ }
r = sd_bus_message_exit_container(m);
if (r < 0)