Add missing SMACK labelling cmd in change_permission. 13/257813/2 accepted/tizen_4.0_unified tizen_4.0 accepted/tizen/4.0/unified/20210504.050901 submit/tizen_4.0/20210503.084422
authorJin-gyu Kim <jin-gyu.kim@samsung.com>
Mon, 3 May 2021 08:13:19 +0000 (17:13 +0900)
committerJin-gyu Kim <jin-gyu.kim@samsung.com>
Mon, 3 May 2021 08:27:30 +0000 (17:27 +0900)
This does not affect any operation, but need to reset SMACK label
for any mismatch in SMACK label.

Change-Id: I0d6053c341d4070d25b7a0839ef439a4972ed424

config/change_permission

index 5a27d50dc1af8b9671878a3573eeb58e7d5a2f82..f53bc569f1e5142d7c8ed8832f94dafecee1f869 100644 (file)
@@ -29,8 +29,14 @@ done
 
 # change permission to /opt/var/lib/misc
 # This is needed to retrieve CAP_DAC_OVERRIDE from mobileap-agent & dnsmasq.
-if [ -e /opt/var/lib/misc ]
+if [ -e "/opt/var/lib/misc" ]
 then
        chown root:system_share /opt/var/lib/misc
        chmod 0775 /opt/var/lib/misc
 fi
+
+# Set SMACK label as "System::Privileged" in /opt/var/security-manager/rules
+if [ -e "/opt/var/security-manager/rules" ]
+then
+       chsmack -r -a "System::Privileged" /opt/var/security-manager/rules
+fi