summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortaesub.kim <taesub.kim@samsung.com>2015-07-28 10:02:02 (GMT)
committertaesub.kim <taesub.kim@samsung.com>2015-07-28 10:03:00 (GMT)
commite9a0e10ae466822cee2bf3d47d0a023e38fd780b (patch)
treef0d5fb427840a7b85808c9a3e9c51c6ade8c896c /src
parent0c1d708bf11b73cd5c8c902b983d73abb42ceaf1 (diff)
downloadconnman-e9a0e10ae466822cee2bf3d47d0a023e38fd780b.zip
connman-e9a0e10ae466822cee2bf3d47d0a023e38fd780b.tar.gz
connman-e9a0e10ae466822cee2bf3d47d0a023e38fd780b.tar.bz2
Modified smack label for resolv.conf filesubmit/tizen/20150728.100704refs/changes/37/44837/1
Change-Id: Ifd271983fdd1752bad4840f29964f5c103738aba Signed-off-by: Taesub Kim <taesub.kim@samsung.com>
Diffstat (limited to 'src')
-rw-r--r--src/resolver.c9
1 files changed, 9 insertions, 0 deletions
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 <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;