summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortaesub.kim <taesub.kim@samsung.com>2015-07-28 19:02:02 +0900
committertaesub.kim <taesub.kim@samsung.com>2015-07-28 19:03:00 +0900
commite9a0e10ae466822cee2bf3d47d0a023e38fd780b (patch)
treef0d5fb427840a7b85808c9a3e9c51c6ade8c896c
parent0c1d708bf11b73cd5c8c902b983d73abb42ceaf1 (diff)
downloadconnman-submit/tizen/20150728.100704.tar.gz
connman-submit/tizen/20150728.100704.tar.bz2
connman-submit/tizen/20150728.100704.zip
Modified smack label for resolv.conf filesubmit/tizen/20150728.100704
Change-Id: Ifd271983fdd1752bad4840f29964f5c103738aba Signed-off-by: Taesub Kim <taesub.kim@samsung.com>
-rw-r--r--configure.ac7
-rw-r--r--packaging/connman.spec5
-rw-r--r--src/resolver.c9
3 files changed, 19 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index dee2dcbf..08f42dc0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -67,6 +67,13 @@ AC_ARG_ENABLE(telephony,
AM_CONDITIONAL(TELEPHONY, test "${enable_telephony}" != "no")
AM_CONDITIONAL(TELEPHONY_BUILTIN, test "${enable_telephony}" = "builtin")
+AC_ARG_ENABLE(tizen-ext,
+ AC_HELP_STRING([--enable-tizen-ext], [enable TIZEN extensions]),
+ [if (test "${enableval}" = "yes"); then
+ CFLAGS="$CFLAGS -DTIZEN_EXT"
+ LIBS="$LIBS -lsmack"
+ fi])
+
AC_ARG_WITH(openconnect, AC_HELP_STRING([--with-openconnect=PROGRAM],
[specify location of openconnect binary]), [path_openconnect=${withval}])
diff --git a/packaging/connman.spec b/packaging/connman.spec
index 830977e6..b3f58cf0 100644
--- a/packaging/connman.spec
+++ b/packaging/connman.spec
@@ -4,7 +4,7 @@
%bcond_with connman_ntp
Name: connman
-Version: 1.26
+Version: 1.26.1
Release: 1
License: GPL-2.0
Summary: Connection Manager
@@ -19,6 +19,7 @@ BuildRequires: pkgconfig(dbus-1)
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(libiptc)
BuildRequires: pkgconfig(xtables)
+BuildRequires: pkgconfig(libsmack)
BuildRequires: pkgconfig(gnutls)
%if %{with connman_openconnect}
BuildRequires: openconnect
@@ -86,13 +87,13 @@ Header files and development files for connman.
cp %{SOURCE1001} .
%build
-CFLAGS+=" -DTIZEN_EXT"
chmod +x bootstrap
./bootstrap
%configure \
--enable-threads \
--enable-client \
+ --enable-tizen-ext \
--enable-pacrunner \
--enable-wifi=builtin \
%if %{with connman_openconnect}
diff --git a/src/resolver.c b/src/resolver.c
index 01e7c0e0..f6fd0632 100644
--- a/src/resolver.c
+++ b/src/resolver.c
@@ -37,6 +37,10 @@
#define RESOLVER_FLAG_PUBLIC (1 << 0)
+#if defined TIZEN_EXT
+#include <sys/smack.h>
+#endif
+
/*
* Threshold for RDNSS lifetime. Will be used to trigger RS
* before RDNSS entries actually expire
@@ -137,6 +141,11 @@ static int resolvfile_export(void)
goto done;
}
+#if defined TIZEN_EXT
+ if (smack_fsetlabel(fd, "_", SMACK_LABEL_ACCESS) != 0)
+ DBG("Failed to label _");
+#endif
+
if (ftruncate(fd, 0) < 0) {
err = -errno;
goto failed;