summaryrefslogtreecommitdiff
path: root/src/import
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-02-18 12:55:25 +0100
committerLennart Poettering <lennart@poettering.net>2015-02-18 12:55:25 +0100
commitc529695e7a30b300fdaa61ace4a8a4ed0e94ad1c (patch)
treeb8613d0df12627f161c4be274378329bea2e72fc /src/import
parent2723b3b51d409340558e46e37e90525d4f880fe1 (diff)
logind: open up most bus calls for unpriviliged processes, using PolicyKit
Also, allow clients to alter their own objects without any further priviliges. i.e. this allows clients to kill and lock their own sessions without involving PK.
Diffstat (limited to 'src/import')
-rw-r--r--src/import/importd.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/import/importd.c b/src/import/importd.c
index 1222bf3cd2..2eef476015 100644
--- a/src/import/importd.c
+++ b/src/import/importd.c
@@ -661,6 +661,7 @@ static int method_pull_tar_or_raw(sd_bus *bus, sd_bus_message *msg, void *userda
CAP_SYS_ADMIN,
"org.freedesktop.import1.pull",
false,
+ UID_INVALID,
&m->polkit_registry,
error);
if (r < 0)
@@ -736,6 +737,7 @@ static int method_pull_dkr(sd_bus *bus, sd_bus_message *msg, void *userdata, sd_
CAP_SYS_ADMIN,
"org.freedesktop.import1.pull",
false,
+ UID_INVALID,
&m->polkit_registry,
error);
if (r < 0)
@@ -865,6 +867,7 @@ static int method_cancel(sd_bus *bus, sd_bus_message *msg, void *userdata, sd_bu
CAP_SYS_ADMIN,
"org.freedesktop.import1.pull",
false,
+ UID_INVALID,
&t->manager->polkit_registry,
error);
if (r < 0)
@@ -894,6 +897,7 @@ static int method_cancel_transfer(sd_bus *bus, sd_bus_message *msg, void *userda
CAP_SYS_ADMIN,
"org.freedesktop.import1.pull",
false,
+ UID_INVALID,
&m->polkit_registry,
error);
if (r < 0)