[Problem]
Most db files have 'floor' label. Because these are created when binary is built.
No process can write db (since 'floor' label allows only read and execute)
[Solution]
Modify smack label based on below condition and three domain model
Condition1. Assign domain of process creates db files
Condition2. Assign domain of process uses db files.
Change-Id: Iee8466b4f7982439c19ef8cf8b8636e1b8160881
Signed-off-by: jooseong.lee <jooseong.lee@samsung.com>
if [ -f %{TZ_SYS_DB}/.dnet.db ]
then
chmod 660 %{TZ_SYS_DB}/.dnet.db
+ chsmack -a 'System' %{TZ_SYS_DB}/.dnet.db
fi
if [ -f %{TZ_SYS_DB}/.dnet.db-journal ]
then
chmod 664 %{TZ_SYS_DB}/.dnet.db-journal
+ chsmack -a 'System' %{TZ_SYS_DB}/.dnet.db-journal
fi
%postun -p /sbin/ldconfig