]> git.ipfire.org Git - thirdparty/systemd.git/commit
logind: factor out polkit checks
authorDaniel Mack <daniel@zonque.org>
Mon, 20 Apr 2015 13:19:26 +0000 (15:19 +0200)
committerDaniel Mack <daniel@zonque.org>
Fri, 24 Apr 2015 15:48:12 +0000 (17:48 +0200)
commitb7aa9589e0bf37cd2682dee4528bd32a794d1363
treeaac0d927b3a5b7836276001c1183601d3f3f0b28
parent905f0a39ae65010d5229c76b0c54d8a8a8eb56d5
logind: factor out polkit checks

Factor out the code to ask polkit for authorization from
method_do_shutdown_or_sleep() into an own function called
verify_shutdown_creds().

This is needed in order to also use the same checks when shutdown
operations are scheduled. For that, it's also necessary to allow
NULL values for that action{,_multiple_sessions,_ignore_inhibit)
arguments, which will suppress the call if no action string is
passed.
src/login/logind-dbus.c