chiark / gitweb /
logind: factor out polkit checks
authorDaniel Mack <daniel@zonque.org>
Mon, 20 Apr 2015 13:19:26 +0000 (15:19 +0200)
committerSven Eden <yamakuzure@gmx.net>
Tue, 14 Mar 2017 07:07:01 +0000 (08:07 +0100)
commitb9db6972db2353eb26744c46e30e7f6d1d56e037
tree77132fac5a1ecd0425aae71b92a9052637ca9ffb
parentb87df1e2ab57146e68e95964a3618b6ebf5ae3f9
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