Modification about smack label of db file belong to process. 18/20618/2 accepted/tizen_3.0.2014.q3_common accepted/tizen_common accepted/tizen_mobile accepted/tizen_tv accepted/tizen_wearable tizen tizen_3.0.2014.q3_common tizen_3.0.2014.q4_common tizen_3.0.2015.q1_common tizen_3.0.2015.q2_common submit/tizen_common/20140521.163740 submit/tizen_common/20140522.130648 submit/tizen_common/20140522.135644 submit/tizen_mobile/20141120.000000 tizen_3.0.2014.q3_common_release
authorjooseong.lee <jooseong.lee@samsung.com>
Fri, 9 May 2014 12:51:32 +0000 (21:51 +0900)
committerjooseong lee <jooseong.lee@samsung.com>
Fri, 9 May 2014 12:51:28 +0000 (05:51 -0700)
[Problem]
Most db files have 'floor' label.  Because these are created during image creation time.
Therefore no process can write the dbs (since 'floor' label allows only read and execute)

[Solution]
Modify smack label of the db files based on condition below referring three domain model
Condition1. Assign domain of process which creates db files
Condition2. Assign domain of process accesses db files.

Change-Id: I419b0114e7aea0254bc3945c5358bec635a1d80b
Signed-off-by: jooseong.lee <jooseong.lee@samsung.com>
packaging/libslp-memo.spec

index b9c9415..f78c335 100755 (executable)
@@ -54,6 +54,8 @@ chown :%{TZ_SYS_USER_GROUP} %{TZ_SYS_DB}/.memo.db-journal
 chmod 660  %{TZ_SYS_DB}/.memo.db
 chmod 660  %{TZ_SYS_DB}/.memo.db-journal
 
+chsmack -a 'User' %{TZ_SYS_DB}/.memo.db*
+
 %postun -p /sbin/ldconfig
 
 %files