Set smack label to /etc/skel/share/.voice and {user home}/share/.voice 90/107490/3 accepted/tizen_3.0.m2_mobile accepted/tizen_3.0.m2_tv accepted/tizen_3.0.m2_wearable tizen_3.0.m2 accepted/tizen/3.0.m2/mobile/20170104.141751 accepted/tizen/3.0.m2/tv/20170104.142133 accepted/tizen/3.0.m2/wearable/20170104.142426 accepted/tizen/3.0/common/20161229.112845 accepted/tizen/3.0/ivi/20161229.054748 accepted/tizen/3.0/mobile/20161229.054712 accepted/tizen/3.0/tv/20161229.054725 accepted/tizen/3.0/wearable/20161229.054736 submit/tizen_3.0.m2/20170104.093751 submit/tizen_3.0/20161228.082439
authorjooseong lee <jooseong.lee@samsung.com>
Wed, 28 Dec 2016 07:55:59 +0000 (16:55 +0900)
committerjooseong lee <jooseong.lee@samsung.com>
Wed, 28 Dec 2016 08:06:44 +0000 (17:06 +0900)
Change-Id: I1ea6b92c00f261daf43abc971bc05b8cb4bbd9bc
Signed-off-by: jooseong lee <jooseong.lee@samsung.com>
config/set_capability

index ec0b41c284fa6acc5bd95288af22a66cc8ff82c6..1cfeceb34f889cab94b2f26645a7a477a18b8e38 100755 (executable)
@@ -355,3 +355,22 @@ if [ -e "/usr/bin/email-service" ]
 then /usr/sbin/setcap cap_chown=eip /usr/bin/email-service
 fi
 
+
+# TODO: MOVE TO OTHER SCRIPT OR REMOVE
+# Requested by sooyeon.kim@samsung.com
+if [ -e "/etc/skel/share/.voice" ]
+then
+find /etc/skel/share/.voice -print0 | xargs -0 chown app_fw:app_fw
+find /etc/skel/share/.voice -print0 | xargs -0 chsmack -a 'User::App::Shared'
+find /etc/skel/share/.voice -type d -print0 | xargs -0 chsmack -t
+fi
+
+for line in `find /opt/usr/home -maxdepth 1 -type d`
+do
+        if [ -e "$line/share/.voice" ]; then
+                user=$(echo $line | cut -d"/" -f5);
+                find "$line/share/.voice" -print0 | xargs -0 chown $user:users
+                find "$line/share/.voice" -print0 | xargs -0 chsmack -a 'User::App::Shared'
+                find "$line/share/.voice" -type d -print0 | xargs -0 chsmack -t
+        fi
+done