diff options
Diffstat (limited to 't/recipes/checks/desktop/dbus')
14 files changed, 68 insertions, 0 deletions
diff --git a/t/recipes/checks/desktop/dbus/dbus-policy/build-spec/debian/install b/t/recipes/checks/desktop/dbus/dbus-policy/build-spec/debian/install new file mode 100644 index 0000000..a75e237 --- /dev/null +++ b/t/recipes/checks/desktop/dbus/dbus-policy/build-spec/debian/install @@ -0,0 +1,2 @@ +etc +usr diff --git a/t/recipes/checks/desktop/dbus/dbus-policy/build-spec/fill-values b/t/recipes/checks/desktop/dbus/dbus-policy/build-spec/fill-values new file mode 100644 index 0000000..8466676 --- /dev/null +++ b/t/recipes/checks/desktop/dbus/dbus-policy/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: dbus-policy +Description: test deprecated D-Bus policies diff --git a/t/recipes/checks/desktop/dbus/dbus-policy/build-spec/orig/etc/dbus-1/system.d/send-destination.conf b/t/recipes/checks/desktop/dbus/dbus-policy/build-spec/orig/etc/dbus-1/system.d/send-destination.conf new file mode 100644 index 0000000..ae052ff --- /dev/null +++ b/t/recipes/checks/desktop/dbus/dbus-policy/build-spec/orig/etc/dbus-1/system.d/send-destination.conf @@ -0,0 +1,14 @@ +<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"> +<busconfig> + <policy user="root"> + <allow send_interface="org.freedesktop.DBus.ObjectManager"/> + </policy> + <policy user="nobody"> + <allow send_interface="org.freedesktop.DBus.ObjectManager"/> + </policy> + <policy context="default"> + <allow send_interface="org.freedesktop.DBus.ObjectManager"/> + <allow send_member="AreYouReallySureThisMethodIsAlwaysOK"/> + <allow send_path="/com/example/Here"/> + </policy> +</busconfig> diff --git a/t/recipes/checks/desktop/dbus/dbus-policy/build-spec/orig/usr/share/dbus-1/system.d/at-console.conf b/t/recipes/checks/desktop/dbus/dbus-policy/build-spec/orig/usr/share/dbus-1/system.d/at-console.conf new file mode 100644 index 0000000..8c47adb --- /dev/null +++ b/t/recipes/checks/desktop/dbus/dbus-policy/build-spec/orig/usr/share/dbus-1/system.d/at-console.conf @@ -0,0 +1,15 @@ +<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"> +<busconfig> + + <!-- this is OK, at least for now --> + <policy group="bluetooth"> + <allow send_destination="com.example.Service"/> + <allow send_destination="com.example.Other"/> + </policy> + + <!-- this is deprecated --> + <policy at_console="true"> + <allow send_destination="com.example.Service"/> + <allow send_destination="com.example.Other"/> + </policy> +</busconfig> diff --git a/t/recipes/checks/desktop/dbus/dbus-policy/eval/desc b/t/recipes/checks/desktop/dbus/dbus-policy/eval/desc new file mode 100644 index 0000000..a1b0e16 --- /dev/null +++ b/t/recipes/checks/desktop/dbus/dbus-policy/eval/desc @@ -0,0 +1,2 @@ +Testname: dbus-policy +Check: desktop/dbus diff --git a/t/recipes/checks/desktop/dbus/dbus-policy/eval/hints b/t/recipes/checks/desktop/dbus/dbus-policy/eval/hints new file mode 100644 index 0000000..6066067 --- /dev/null +++ b/t/recipes/checks/desktop/dbus/dbus-policy/eval/hints @@ -0,0 +1,9 @@ +dbus-policy (binary): dbus-policy-without-send-destination <policy user="nobody"><allow send_interface="org.freedesktop.DBus.ObjectManager"/> [etc/dbus-1/system.d/send-destination.conf:2] +dbus-policy (binary): dbus-policy-without-send-destination <policy context="default"><allow send_path="/com/example/Here"/> [etc/dbus-1/system.d/send-destination.conf:5] +dbus-policy (binary): dbus-policy-without-send-destination <policy context="default"><allow send_member="AreYouReallySureThisMethodIsAlwaysOK"/> [etc/dbus-1/system.d/send-destination.conf:4] +dbus-policy (binary): dbus-policy-without-send-destination <policy context="default"><allow send_interface="org.freedesktop.DBus.ObjectManager"/> [etc/dbus-1/system.d/send-destination.conf:3] +dbus-policy (binary): dbus-policy-excessively-broad <policy context="default"><allow send_path="/com/example/Here"/> [etc/dbus-1/system.d/send-destination.conf:5] +dbus-policy (binary): dbus-policy-excessively-broad <policy context="default"><allow send_member="AreYouReallySureThisMethodIsAlwaysOK"/> [etc/dbus-1/system.d/send-destination.conf:4] +dbus-policy (binary): dbus-policy-in-etc [etc/dbus-1/system.d/send-destination.conf] +dbus-policy (binary): dbus-policy-at-console <policy at_console="true"><allow send_destination="com.example.Service"/> [usr/share/dbus-1/system.d/at-console.conf:3] +dbus-policy (binary): dbus-policy-at-console <policy at_console="true"><allow send_destination="com.example.Other"/> [usr/share/dbus-1/system.d/at-console.conf:4] diff --git a/t/recipes/checks/desktop/dbus/dbus-services/build-spec/debian/install b/t/recipes/checks/desktop/dbus/dbus-services/build-spec/debian/install new file mode 100644 index 0000000..73752c9 --- /dev/null +++ b/t/recipes/checks/desktop/dbus/dbus-services/build-spec/debian/install @@ -0,0 +1 @@ +usr diff --git a/t/recipes/checks/desktop/dbus/dbus-services/build-spec/fill-values b/t/recipes/checks/desktop/dbus/dbus-services/build-spec/fill-values new file mode 100644 index 0000000..694bdb7 --- /dev/null +++ b/t/recipes/checks/desktop/dbus/dbus-services/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: dbus-services +Description: test D-Bus .service files diff --git a/t/recipes/checks/desktop/dbus/dbus-services/build-spec/orig/usr/share/dbus-1/services/gvfs-daemon.service b/t/recipes/checks/desktop/dbus/dbus-services/build-spec/orig/usr/share/dbus-1/services/gvfs-daemon.service new file mode 100644 index 0000000..1a8607d --- /dev/null +++ b/t/recipes/checks/desktop/dbus/dbus-services/build-spec/orig/usr/share/dbus-1/services/gvfs-daemon.service @@ -0,0 +1,3 @@ +[D-BUS Service] +Name=org.gtk.vfs.Daemon +Exec=/usr/lib/gvfs/gvfsd diff --git a/t/recipes/checks/desktop/dbus/dbus-services/build-spec/orig/usr/share/dbus-1/services/org.mpris.MediaPlayer2.mpd.service b/t/recipes/checks/desktop/dbus/dbus-services/build-spec/orig/usr/share/dbus-1/services/org.mpris.MediaPlayer2.mpd.service new file mode 100644 index 0000000..3f14f4a --- /dev/null +++ b/t/recipes/checks/desktop/dbus/dbus-services/build-spec/orig/usr/share/dbus-1/services/org.mpris.MediaPlayer2.mpd.service @@ -0,0 +1,3 @@ +[D-BUS Service] +Name=org.mpris.MediaPlayer2.mpd +Exec=/usr/bin/mpDris2 diff --git a/t/recipes/checks/desktop/dbus/dbus-services/build-spec/orig/usr/share/dbus-1/system-services/org.freedesktop.PolicyKit1.service b/t/recipes/checks/desktop/dbus/dbus-services/build-spec/orig/usr/share/dbus-1/system-services/org.freedesktop.PolicyKit1.service new file mode 100644 index 0000000..51d1f94 --- /dev/null +++ b/t/recipes/checks/desktop/dbus/dbus-services/build-spec/orig/usr/share/dbus-1/system-services/org.freedesktop.PolicyKit1.service @@ -0,0 +1,5 @@ +[D-BUS Service] +Name=org.freedesktop.PolicyKit1 +Exec=/usr/lib/policykit-1/polkitd --no-debug +User=root +SystemdService=polkitd.service diff --git a/t/recipes/checks/desktop/dbus/dbus-services/build-spec/orig/usr/share/dbus-1/system-services/this-name-cannot-work.service b/t/recipes/checks/desktop/dbus/dbus-services/build-spec/orig/usr/share/dbus-1/system-services/this-name-cannot-work.service new file mode 100644 index 0000000..e87a5bb --- /dev/null +++ b/t/recipes/checks/desktop/dbus/dbus-services/build-spec/orig/usr/share/dbus-1/system-services/this-name-cannot-work.service @@ -0,0 +1,4 @@ +[D-BUS Service] +Name=com.example.SystemDaemon1 +Exec=/usr/sbin/example-system-daemon +User=nobody diff --git a/t/recipes/checks/desktop/dbus/dbus-services/eval/desc b/t/recipes/checks/desktop/dbus/dbus-services/eval/desc new file mode 100644 index 0000000..8102dfa --- /dev/null +++ b/t/recipes/checks/desktop/dbus/dbus-services/eval/desc @@ -0,0 +1,2 @@ +Testname: dbus-services +Check: desktop/dbus diff --git a/t/recipes/checks/desktop/dbus/dbus-services/eval/hints b/t/recipes/checks/desktop/dbus/dbus-services/eval/hints new file mode 100644 index 0000000..1f45b32 --- /dev/null +++ b/t/recipes/checks/desktop/dbus/dbus-services/eval/hints @@ -0,0 +1,2 @@ +dbus-services (binary): dbus-system-service-wrong-name better: com.example.SystemDaemon1.service [usr/share/dbus-1/system-services/this-name-cannot-work.service] +dbus-services (binary): dbus-session-service-wrong-name better: org.gtk.vfs.Daemon.service [usr/share/dbus-1/services/gvfs-daemon.service] |