[podsleuth] Install a dbus policy to fix podsleuth --rescan



commit 7d0b3776985ffd6acc3f44a598c0fc27f56f8c08
Author: Gabriel Burt <gabriel burt gmail com>
Date:   Tue Dec 8 18:17:47 2009 -0800

    Install a dbus policy to fix podsleuth --rescan
    
    You will likely want to run autogen.sh with --sysconfdir=/etc

 configure.ac        |   12 ++++++++++++
 data/Makefile.am    |    4 ++++
 data/podsleuth.conf |   16 ++++++++++++++++
 3 files changed, 32 insertions(+), 0 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 7ca0143..4f9c50e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -25,6 +25,18 @@ PODSLEUTH_CHECK_HAL(0.5.6)
 PODSLEUTH_CHECK_SGUTILS
 PODSLEUTH_CHECK_UPDATE_DIR
 
+# taken from HAL's configure.in
+AC_ARG_WITH([dbus-sys],
+        AS_HELP_STRING([--with-dbus-sys=<dir>],
+               [where D-BUS system.d directory is]))
+
+if ! test -z "$with_dbus_sys" ; then
+    DBUS_SYS_DIR="$with_dbus_sys"
+else
+    DBUS_SYS_DIR="$sysconfdir/dbus-1/system.d"
+fi
+AC_SUBST(DBUS_SYS_DIR)
+
 AC_OUTPUT([
 	Makefile
 	m4/Makefile
diff --git a/data/Makefile.am b/data/Makefile.am
index c9f011b..11cedc9 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -1,6 +1,9 @@
 fdidir = $(datadir)/hal/fdi/policy/20thirdparty
 fdi_DATA = 20-podsleuth.fdi
 
+dbusdir = $(DBUS_SYS_DIR)
+dbus_DATA = podsleuth.conf
+
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = podsleuth.pc
 
@@ -9,6 +12,7 @@ edit-table:
 
 EXTRA_DIST = \
 	ipod-model-table \
+	podsleuth.conf \
 	20-podsleuth.fdi
 
 MAINTAINERCLEANFILES = \
diff --git a/data/podsleuth.conf b/data/podsleuth.conf
new file mode 100644
index 0000000..98254d9
--- /dev/null
+++ b/data/podsleuth.conf
@@ -0,0 +1,16 @@
+<!DOCTYPE busconfig PUBLIC
+ "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
+ "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd";>
+<busconfig>
+
+  <!-- This configuration file specifies the required security policies
+       for podsleuth to work. -->
+
+  <!-- Allow anyone to invoke methods on the podsleuth interfaces -->
+  <policy context="default">
+    <allow send_destination="org.freedesktop.Hal"
+           send_interface="org.podsleuth"/>
+  </policy>
+
+</busconfig>
+



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]