Modification about smack label of db file belong to process. 37/20637/2 accepted/tizen/mobile/20140515.054412 submit/tizen/20140515.040459
authorjooseong.lee <jooseong.lee@samsung.com>
Sat, 10 May 2014 06:39:53 +0000 (15:39 +0900)
committerjooseong lee <jooseong.lee@samsung.com>
Sat, 10 May 2014 06:39:51 +0000 (23:39 -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: Ia62a3d5c78e38af87925bad1e891e5386eb5e747
Signed-off-by: jooseong.lee <jooseong.lee@samsung.com>
packaging/tel-plugin-imc.spec

index af65d49..6ebea56 100644 (file)
@@ -46,10 +46,12 @@ rm -f /tmp/mcc_mnc_oper_list.sql
 if [ -f %{TZ_SYS_DB}/.mcc_mnc_oper_list.db ]
 then
        chmod 600 %{TZ_SYS_DB}/.mcc_mnc_oper_list.db
+       chsmack -a 'System' %{TZ_SYS_DB}/.mcc_mnc_oper_list.db
 fi
 if [ -f %{TZ_SYS_DB}/.mcc_mnc_oper_list.db-journal ]
 then
        chmod 644 %{TZ_SYS_DB}/.mcc_mnc_oper_list.db-journal
+       chsmack -a 'System' %{TZ_SYS_DB}/.mcc_mnc_oper_list.db-journal
 fi
 
 %postun -p /sbin/ldconfig