main: Check whether user is allowed to claim a sensor

Check whether a particular user/D-Bus client is allowed to claim a
sensor.

The ClaimCompass method on net.hadess.SensorProxy.Compass doesn't have a
check as only the geoclue user is allowed to access this interface, as
per the D-Bus configuration.
This commit is contained in:
Bastien Nocera
2021-09-29 11:30:52 +02:00
parent abd16b5911
commit 0b1574d0eb
5 changed files with 45 additions and 3 deletions

View File

@@ -44,6 +44,8 @@ if get_option('gtk-tests')
endif
gio_dep = dependency('gio-2.0')
gudev_dep = dependency('gudev-1.0', version: '>= 237')
polkit_gobject_dep = dependency('polkit-gobject-1', version: '>= 0.91')
polkit_policy_directory = polkit_gobject_dep.get_pkgconfig_variable('policydir')
xmllint = find_program('xmllint', required: false)