nm: Move the D-Bus policy to charon-nm
authorLubomir Rintel <lkundrak@v3.sk>
Wed, 21 Oct 2015 10:55:03 +0000 (12:55 +0200)
committerTobias Brunner <tobias@strongswan.org>
Mon, 5 Sep 2016 13:28:53 +0000 (15:28 +0200)
It's needed for useful use of charon-nm, unlike the GUI.

src/charon-nm/Makefile.am
src/charon-nm/nm-strongswan-service.conf [new file with mode: 0644]
src/frontends/gnome/Makefile.am
src/frontends/gnome/nm-strongswan-service.conf [deleted file]

index 6ab7f27..5c1591b 100644 (file)
@@ -22,3 +22,6 @@ charon_nm_LDADD = \
        $(top_builddir)/src/libstrongswan/libstrongswan.la \
        $(top_builddir)/src/libcharon/libcharon.la \
        -lm $(PTHREADLIB) $(ATOMICLIB) $(DLLIB) ${nm_LIBS}
+
+dbusservicedir = $(sysconfdir)/dbus-1/system.d
+dbusservice_DATA = nm-strongswan-service.conf
diff --git a/src/charon-nm/nm-strongswan-service.conf b/src/charon-nm/nm-strongswan-service.conf
new file mode 100644 (file)
index 0000000..dccc19a
--- /dev/null
@@ -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>
+       <policy user="root">
+               <allow own="org.freedesktop.NetworkManager.strongswan"/>
+               <allow send_destination="org.freedesktop.NetworkManager.strongswan"/>
+               <allow send_interface="org.freedesktop.NetworkManager.strongswan"/>
+       </policy>
+       <policy context="default">
+               <deny own="org.freedesktop.NetworkManager.strongswan"/>
+               <deny send_destination="org.freedesktop.NetworkManager.strongswan"/>
+               <deny send_interface="org.freedesktop.NetworkManager.strongswan"/>
+       </policy>
+</busconfig>
+
index 6ea29e0..a101995 100644 (file)
@@ -2,9 +2,6 @@ AUTOMAKE_OPTIONS = foreign
 
 SUBDIRS = properties auth-dialog po
 
-dbusservicedir = $(sysconfdir)/dbus-1/system.d
-dbusservice_DATA = nm-strongswan-service.conf
-
 nmvpnservicedir = $(sysconfdir)/NetworkManager/VPN
 nmvpnservice_DATA = nm-strongswan-service.name
 
@@ -20,8 +17,8 @@ nm-strongswan-service.name: $(srcdir)/nm-strongswan-service.name.in
        sed -e 's|[@]LIBEXECDIR[@]|$(libexecdir)|' \
            -e 's|[@]CHARON[@]|$(charon)|' $< >$@
 
-EXTRA_DIST = nm-strongswan-service.name.in \
-    $(dbusservice_DATA)  \
+EXTRA_DIST = \
+    nm-strongswan-service.name.in  \
     $(appdata_in_files)  \
     $(appdata_DATA)      \
     intltool-extract.in  \
diff --git a/src/frontends/gnome/nm-strongswan-service.conf b/src/frontends/gnome/nm-strongswan-service.conf
deleted file mode 100644 (file)
index dccc19a..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-<!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.strongswan"/>
-               <allow send_destination="org.freedesktop.NetworkManager.strongswan"/>
-               <allow send_interface="org.freedesktop.NetworkManager.strongswan"/>
-       </policy>
-       <policy context="default">
-               <deny own="org.freedesktop.NetworkManager.strongswan"/>
-               <deny send_destination="org.freedesktop.NetworkManager.strongswan"/>
-               <deny send_interface="org.freedesktop.NetworkManager.strongswan"/>
-       </policy>
-</busconfig>
-