summaryrefslogtreecommitdiff
path: root/src/login/logind-dbus.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-09-18 01:16:23 +0200
committerLennart Poettering <lennart@poettering.net>2012-09-18 01:16:23 +0200
commitb14eda963c698aa89fac1d91501d572ec644cc2f (patch)
treecb2eb4a6ded34b0037018ae89886de41c69ce10b /src/login/logind-dbus.c
parent178cc7700c23ac088cd7190d7854282075028d91 (diff)
logind: split up inhibit acquire policy
Diffstat (limited to 'src/login/logind-dbus.c')
-rw-r--r--src/login/logind-dbus.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c
index af62d87821..4f180b013d 100644
--- a/src/login/logind-dbus.c
+++ b/src/login/logind-dbus.c
@@ -723,9 +723,10 @@ static int bus_manager_inhibit(Manager *m, DBusConnection *connection, DBusMessa
}
r = verify_polkit(connection, message,
- m == INHIBIT_BLOCK ?
- "org.freedesktop.login1.inhibit-block" :
- "org.freedesktop.login1.inhibit-delay", false, NULL, error);
+ w == INHIBIT_SHUTDOWN ? (mm == INHIBIT_BLOCK ? "org.freedesktop.login1.inhibit-block-shutdown" : "org.freedesktop.login1.inhibit-delay-shutdown") :
+ w == INHIBIT_SLEEP ? (mm == INHIBIT_BLOCK ? "org.freedesktop.login1.inhibit-block-sleep" : "org.freedesktop.login1.inhibit-delay-sleep") :
+ (mm == INHIBIT_BLOCK ? "org.freedesktop.login1.inhibit-block-idle" : "org.freedesktop.login1.inhibit-delay-idle"),
+ false, NULL, error);
if (r < 0)
goto fail;