summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKalle Valo <kalle.valo@canonical.com>2011-01-28 17:02:49 +0200
committerSamuel Ortiz <sameo@linux.intel.com>2011-01-28 16:20:28 +0100
commit3f3d919578a0ac7d44ddd98f71033f0aaeb6f45b (patch)
treea5e54a7cd060dc5dcafa4821cf3b370e604fda77
parent05ad678faf94266f0a51b8eba63f9a7e8d8acc03 (diff)
downloadconnman-3f3d919578a0ac7d44ddd98f71033f0aaeb6f45b.tar.gz
connman-3f3d919578a0ac7d44ddd98f71033f0aaeb6f45b.tar.bz2
connman-3f3d919578a0ac7d44ddd98f71033f0aaeb6f45b.zip
nmcompat: D-Bus configuration file
Add separate dbus configuration file for nmcompat plugin. It will installed only when the plugin is enabled.
-rw-r--r--Makefile.am10
-rw-r--r--plugins/connman-nmcompat.conf14
2 files changed, 22 insertions, 2 deletions
diff --git a/Makefile.am b/Makefile.am
index 67b2c297..144fcc55 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 00000000..5887a345
--- /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>