Apply smack label on system cache 74/98374/1
authorYoungbok Shin <youngb.shin@samsung.com>
Mon, 7 Nov 2016 03:51:45 +0000 (12:51 +0900)
committerJaeun Choi <jaeun12.choi@samsung.com>
Thu, 17 Nov 2016 06:40:50 +0000 (15:40 +0900)
Initial smack label of system fontconfig cache is "_".
It can cause smack deny error if there a request to rewrite the cache.

Change-Id: I35f178ac4e07bdbecffcf177441464fc0db3571c

packaging/fontconfig.spec

index f0723ea..1511de7 100644 (file)
@@ -120,6 +120,9 @@ mkdir -p %{TZ_SYS_RO_SHARE}/app_fonts
 # The HOME setting is to avoid problems if HOME hasn't been reset
 if [ -x %{TZ_SYS_BIN}/fc-cache ] && %{TZ_SYS_BIN}/fc-cache --version 2>&1 | grep -q %{version} ; then
 fc-cache -rf --system-only
+chsmack -t %{TZ_SYS_VAR}/cache/fontconfig
+chsmack -a User::App::Shared %{TZ_SYS_VAR}/cache/fontconfig
+chsmack -a User::App::Shared %{TZ_SYS_VAR}/cache/fontconfig/*
 fi
 
 %postun -p /sbin/ldconfig