Add separate dbus configuration file for nmcompat plugin. It will
installed only when the plugin is enabled.
---
 plugins/connman-nmcompat.conf |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)
 create mode 100644 plugins/connman-nmcompat.conf

diff --git a/Makefile.am b/Makefile.am
index 67b2c29..144fcc5 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -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
+
+if NMCOMPAT
+nmcompat_conf = plugins/connman-nmcompat.conf
+endif
+
 dbusconfdir = @DBUS_CONFDIR@
 
-dbusconf_DATA = src/connman.conf
+dbusconf_DATA = src/connman.conf $(nmcompat_conf)
 
 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
 
-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 =
diff --git a/plugins/connman-nmcompat.conf b/plugins/connman-nmcompat.conf
new file mode 100644
index 0000000..5887a34
--- /dev/null
+++ b/plugins/connman-nmcompat.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 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>

_______________________________________________
connman mailing list
connman@connman.net
http://lists.connman.net/listinfo/connman

Reply via email to