From e9a0e10ae466822cee2bf3d47d0a023e38fd780b Mon Sep 17 00:00:00 2001 From: "taesub.kim" Date: Tue, 28 Jul 2015 19:02:02 +0900 Subject: [PATCH] Modified smack label for resolv.conf file Change-Id: Ifd271983fdd1752bad4840f29964f5c103738aba Signed-off-by: Taesub Kim --- configure.ac | 7 +++++++ packaging/connman.spec | 5 +++-- src/resolver.c | 9 +++++++++ 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index dee2dcb..08f42dc 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 830977e..b3f58cf 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 01e7c0e..f6fd063 100644 --- a/src/resolver.c +++ b/src/resolver.c @@ -37,6 +37,10 @@ #define RESOLVER_FLAG_PUBLIC (1 << 0) +#if defined TIZEN_EXT +#include +#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; -- 2.7.4