summaryrefslogtreecommitdiff
path: root/src/bus-proxyd/bus-proxyd.c
diff options
context:
space:
mode:
authorLukasz Skalski <l.skalski@samsung.com>2015-01-05 14:45:55 +0100
committerDaniel Mack <daniel@zonque.org>2015-01-05 16:02:59 +0100
commit30897dd72b2fb6062d4857abc6b9295b17fda0a4 (patch)
tree133ec66f3a0df0f3b6e5d4f17d5102f37a45b8dc /src/bus-proxyd/bus-proxyd.c
parent8b173b5e8ccbf946ee88af456792d8e720292d9b (diff)
bus-proxyd: don't allow to acquire org.freedesktop.DBus name
Diffstat (limited to 'src/bus-proxyd/bus-proxyd.c')
-rw-r--r--src/bus-proxyd/bus-proxyd.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/bus-proxyd/bus-proxyd.c b/src/bus-proxyd/bus-proxyd.c
index a7818f5462..fc70cce940 100644
--- a/src/bus-proxyd/bus-proxyd.c
+++ b/src/bus-proxyd/bus-proxyd.c
@@ -829,6 +829,10 @@ static int process_driver(sd_bus *a, sd_bus *b, sd_bus_message *m, Policy *polic
if (r < 0)
return synthetic_reply_method_errno(m, r, NULL);
+ if (streq(name, "org.freedesktop.DBus"))
+ return synthetic_reply_method_error(m, &SD_BUS_ERROR_MAKE_CONST(SD_BUS_ERROR_INVALID_ARGS,
+ "Connection is not allowed to own the org.freedesktop.DBus service."));
+
if (policy && !policy_check_own(policy, ucred->uid, ucred->gid, name))
return synthetic_reply_method_errno(m, -EPERM, NULL);