[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>
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