summaryrefslogtreecommitdiff
path: root/src/core/dbus-scope.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/dbus-scope.c')
-rw-r--r--src/core/dbus-scope.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/core/dbus-scope.c b/src/core/dbus-scope.c
index fbb4ff5646..a762223c81 100644
--- a/src/core/dbus-scope.c
+++ b/src/core/dbus-scope.c
@@ -25,6 +25,7 @@
#include "dbus-cgroup.h"
#include "dbus-kill.h"
#include "dbus-scope.h"
+#include "dbus.h"
#include "bus-util.h"
#include "bus-internal.h"
#include "bus-errors.h"
@@ -37,6 +38,12 @@ static int bus_scope_abandon(sd_bus *bus, sd_bus_message *message, void *userdat
assert(message);
assert(s);
+ r = bus_verify_manage_unit_async(UNIT(s)->manager, message, error);
+ if (r < 0)
+ return r;
+ if (r == 0)
+ return 1; /* No authorization for now, but the async polkit stuff will call us again when it has it */
+
r = scope_abandon(s);
if (sd_bus_error_is_set(error))
return r;