data: Add polkit policy description
Describe and set defaults for claiming sensors.
This commit is contained in:
@@ -20,3 +20,18 @@ configure_file(
|
||||
configuration: data_conf,
|
||||
install_dir: dbusconfdir
|
||||
)
|
||||
|
||||
polkit_policy = 'net.hadess.SensorProxy.policy'
|
||||
if xmllint.found()
|
||||
test(polkit_policy,
|
||||
xmllint,
|
||||
args: [
|
||||
'--noout',
|
||||
meson.source_root() / 'data' / polkit_policy,
|
||||
])
|
||||
endif
|
||||
|
||||
install_data(
|
||||
polkit_policy,
|
||||
install_dir: polkit_policy_directory,
|
||||
)
|
||||
|
21
data/net.hadess.SensorProxy.policy
Normal file
21
data/net.hadess.SensorProxy.policy
Normal file
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE policyconfig PUBLIC
|
||||
"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
|
||||
"http://www.freedesktop.org/standards/PolicyKit/1.0/policyconfig.dtd">
|
||||
|
||||
<policyconfig>
|
||||
|
||||
<vendor>iio-sensor-proxy</vendor>
|
||||
<vendor_url>https://gitlab.freedesktop.org/hadess/iio-sensor-proxy</vendor_url>
|
||||
|
||||
<action id="net.hadess.SensorProxy.claim-sensor">
|
||||
<description>Claim Access to a Sensor</description>
|
||||
<message>Privileges are required to claim a sensor.</message>
|
||||
<defaults>
|
||||
<allow_any>no</allow_any>
|
||||
<allow_inactive>no</allow_inactive>
|
||||
<allow_active>yes</allow_active>
|
||||
</defaults>
|
||||
</action>
|
||||
|
||||
</policyconfig>
|
@@ -45,6 +45,8 @@ endif
|
||||
gio_dep = dependency('gio-2.0')
|
||||
gudev_dep = dependency('gudev-1.0', version: '>= 237')
|
||||
|
||||
xmllint = find_program('xmllint', required: false)
|
||||
|
||||
gnome = import('gnome')
|
||||
|
||||
add_global_arguments('-D_GNU_SOURCE=1', language: 'c')
|
||||
|
Reference in New Issue
Block a user