Modification about smack label of db file belong to process. 19/20819/2 tizen_3.0.m14.2_ivi accepted/tizen/common/20140519.225520 accepted/tizen/ivi/20140521.203139 submit/tizen/20140519.014711 tizen_3.0.m14.2_ivi_release
authorjooseong.lee <jooseong.lee@samsung.com>
Tue, 13 May 2014 05:28:44 +0000 (14:28 +0900)
committerjooseong lee <jooseong.lee@samsung.com>
Tue, 13 May 2014 05:28:44 +0000 (22:28 -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: I25afd39c8cafc027e7b5f85f78748f2e092c7f0d
Signed-off-by: jooseong.lee <jooseong.lee@samsung.com>
packaging/email-service.spec

index 7a35a44..473d4b6 100755 (executable)
@@ -126,6 +126,7 @@ ln -s ${EMAIL_SERVICE_EXEC_SCRIPT} ${EMAIL_SERVICE_FASTBOOT_SCRIPT}
 echo "[EMAIL-SERVICE] Finish executing script ..."
 
 chgrp %TZ_SYS_USER_GROUP %{_bindir}/email-service_init_db.sh
+chsmack -a 'User' /opt/usr/dbspace/.email-service.db*
 
 systemctl daemon-reload
 if [ $1 == 1 ]; then