Modification about smack label of db file belong to process. 16/20616/2 submit/tizen/20140519.045034
authorjooseong.lee <jooseong.lee@samsung.com>
Fri, 9 May 2014 12:48:09 +0000 (21:48 +0900)
committerjooseong lee <jooseong.lee@samsung.com>
Fri, 9 May 2014 12:47:59 +0000 (05:47 -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: Ia44ea4a4457a8d34ccdfd56e085eb4f87c5f682f
Signed-off-by: jooseong.lee <jooseong.lee@samsung.com>
packaging/org.tizen.clock.spec

index 354e1fe..a4b95e6 100755 (executable)
@@ -423,6 +423,8 @@ chown :6015 /opt/dbspace/.worldclock.db-journal
 chmod 660 /opt/dbspace/.worldclock.db
 chmod 660 /opt/dbspace/.worldclock.db-journal
 
+chsmack -a 'User' /opt/dbspace/.worldclock.db*
+
 %postun -p /sbin/ldconfig
 
 %files