nmcompat: D-Bus configuration file
authorKalle Valo <kalle.valo@canonical.com>
Fri, 28 Jan 2011 15:02:49 +0000 (17:02 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Fri, 28 Jan 2011 15:20:28 +0000 (16:20 +0100)
Add separate dbus configuration file for nmcompat plugin. It will
installed only when the plugin is enabled.

Makefile.am
plugins/connman-nmcompat.conf [new file with mode: 0644]

index 67b2c29..144fcc5 100644 (file)
@@ -32,9 +32,14 @@ gweb_sources = gweb/gweb.h gweb/gweb.c gweb/gresolv.h gweb/gresolv.c \
                                        gweb/giognutls.h gweb/giognutls.c
 
 if DATAFILES
                                        gweb/giognutls.h gweb/giognutls.c
 
 if DATAFILES
+
+if NMCOMPAT
+nmcompat_conf = plugins/connman-nmcompat.conf
+endif
+
 dbusconfdir = @DBUS_CONFDIR@
 
 dbusconfdir = @DBUS_CONFDIR@
 
-dbusconf_DATA = src/connman.conf
+dbusconf_DATA = src/connman.conf $(nmcompat_conf)
 
 if SYSTEMD
 systemdunitdir = @SYSTEMD_UNITDIR@
 
 if SYSTEMD
 systemdunitdir = @SYSTEMD_UNITDIR@
@@ -109,7 +114,8 @@ AM_CFLAGS = @DBUS_CFLAGS@ @GLIB_CFLAGS@ @CAPNG_CFLAGS@ @XTABLES_CFLAGS@ \
 
 INCLUDES = -I$(builddir)/include -I$(builddir)/src -I$(srcdir)/gdbus
 
 
 INCLUDES = -I$(builddir)/include -I$(builddir)/src -I$(srcdir)/gdbus
 
-EXTRA_DIST = src/genbuiltin src/connman-dbus.conf src/connman-polkit.conf
+EXTRA_DIST = src/genbuiltin src/connman-dbus.conf src/connman-polkit.conf \
+               plugins/connman-nmcompat.conf
 
 
 script_DATA =
 
 
 script_DATA =
diff --git a/plugins/connman-nmcompat.conf b/plugins/connman-nmcompat.conf
new file mode 100644 (file)
index 0000000..5887a34
--- /dev/null
@@ -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 own="org.freedesktop.NetworkManager"/>
+        <allow send_destination="org.freedesktop.NetworkManager"/>
+    </policy>
+    <policy at_console="true">
+        <allow send_destination="org.freedesktop.NetworkManager"/>
+    </policy>
+    <policy context="default">
+        <deny send_destination="org.freedesktop.NetworkManager"/>
+    </policy>
+</busconfig>