summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeonah Moon <seonah1.moon@samsung.com>2016-08-10 11:20:22 +0900
committerSeonah Moon <seonah1.moon@samsung.com>2016-08-10 14:18:55 +0900
commit233bc85a5643c1316dbd915402265c88d06229f9 (patch)
tree43c531a67df9c16986cb7e2e5da19c1e414bfac9
parent365af507ae6183c5b240d65d47466b07d91027ee (diff)
downloadconnman-233bc85a5643c1316dbd915402265c88d06229f9.tar.gz
connman-233bc85a5643c1316dbd915402265c88d06229f9.tar.bz2
connman-233bc85a5643c1316dbd915402265c88d06229f9.zip
Change-Id: I9e04465f130cfee07678046660ca9292a2385dec Signed-off-by: Seonah Moon <seonah1.moon@samsung.com>
-rwxr-xr-xpackaging/connman.spec16
-rw-r--r--src/connman.socket13
2 files changed, 29 insertions, 0 deletions
diff --git a/packaging/connman.spec b/packaging/connman.spec
index 1fd96ebc..b571e59b 100755
--- a/packaging/connman.spec
+++ b/packaging/connman.spec
@@ -154,6 +154,17 @@ mkdir -p %{buildroot}%{_unitdir}/multi-user.target.wants
ln -s ../connman.service %{buildroot}%{_unitdir}/multi-user.target.wants/connman.service
%endif
+#Systemd socket file for DNS proxy
+%if "%{?_lib}" == "lib64"
+cp src/connman.socket %{buildroot}%{_unitdir}/connman.socket
+mkdir -p %{buildroot}%{_unitdir}/sockets.target.wants
+ln -s ../connman.socket %{buildroot}%{_unitdir}/sockets.target.wants/connman.socket
+%else
+cp src/connman.socket %{buildroot}%{_libdir}/systemd/system/connman.socket
+mkdir -p %{buildroot}%{_libdir}/systemd/system/sockets.target.wants
+ln -s ../connman.socket %{buildroot}%{_libdir}/systemd/system/sockets.target.wants/connman.socket
+%endif
+
mkdir -p %{buildroot}/%{_localstatedir}/lib/connman
cp resources/var/lib/connman/settings %{buildroot}/%{_localstatedir}/lib/connman/settings
mkdir -p %{buildroot}%{_datadir}/dbus-1/system-services
@@ -202,6 +213,11 @@ systemctl daemon-reload
%attr(644,root,root) %{_unitdir}/connman.service
%attr(644,root,root) %{_unitdir}/multi-user.target.wants/connman.service
%attr(644,root,root) %{_unitdir}/connman-vpn.service
+%attr(644,root,root) %{_unitdir}/connman.socket
+%attr(644,root,root) %{_unitdir}/sockets.target.wants/connman.socket
+%else
+%attr(644,root,root) %{_libdir}/systemd/system/connman.socket
+%attr(644,root,root) %{_libdir}/systemd/system/sockets.target.wants/connman.socket
%endif
%{_datadir}/license/connman
diff --git a/src/connman.socket b/src/connman.socket
new file mode 100644
index 00000000..e27041f2
--- /dev/null
+++ b/src/connman.socket
@@ -0,0 +1,13 @@
+[Unit]
+Description=DNS Proxy Socket
+Before=connman.service
+
+[Socket]
+ListenStream=0.0.0.0:53
+ListenDatagram=0.0.0.0:53
+FreeBind=true
+SmackLabelIPIn=*
+SmackLabelIPOut=@
+
+[Install]
+WantedBy=sockets.target \ No newline at end of file