Modification about smack label of db file belong to process. 62/20562/2 accepted/tizen_3.0.2014.q3_common accepted/tizen_3.0.m14.3_ivi tizen_3.0.2014.q3_common tizen_3.0.2014.q4_common tizen_3.0.2015.q1_common tizen_3.0.m14.2_ivi tizen_3.0.m14.3_ivi tizen_3.0_ivi accepted/tizen/common/20140519.224915 accepted/tizen/ivi/20140521.165053 accepted/tizen/mobile/20140515.054439 submit/tizen/20140515.045614 submit/tizen_mobile/20141120.000000 tizen_3.0.2014.q3_common_release tizen_3.0.m14.2_ivi_release tizen_3.0.m14.3_ivi_release tizen_3.0_ivi_release
authorjooseong.lee <jooseong.lee@samsung.com>
Fri, 9 May 2014 08:32:26 +0000 (17:32 +0900)
committerjooseong lee <jooseong.lee@samsung.com>
Fri, 9 May 2014 08:35:14 +0000 (01:35 -0700)
[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>
packaging/tel-plugin-packetservice.spec

index 29a9570..12e3879 100644 (file)
@@ -53,11 +53,13 @@ rm -f /usr/share/ps-plugin/dnet_db_data.sql
 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