From c08ce7386e83d4768d20421cfcd00940eccd34d2 Mon Sep 17 00:00:00 2001 From: Rusty Lynch Date: Thu, 24 Oct 2013 14:21:46 -0700 Subject: [PATCH] PTREL-143: Remove Tizen 2.2 smack labels All of Tizen 3.0 must use floor labels until the Tizen 3.0 domain structure has been finalized. Change-Id: I1abdd67b0af14e91676fe4fb5e29b7dc01a770e8 Signed-off-by: Rusty Lynch --- etc/wrt_commons_create_clean_db.sh | 25 ++++++++++++++----------- packaging/wrt-commons.spec | 17 ++++++++++------- 2 files changed, 24 insertions(+), 18 deletions(-) diff --git a/etc/wrt_commons_create_clean_db.sh b/etc/wrt_commons_create_clean_db.sh index 7408082..206359a 100755 --- a/etc/wrt_commons_create_clean_db.sh +++ b/etc/wrt_commons_create_clean_db.sh @@ -37,17 +37,20 @@ function create_db { pkill -9 security-serv - # restore smack label - if [ -n "$DB_LABEL" ] - then - chsmack -a "$DB_LABEL" $dbpath.$name.db - fi - - # restore smack label - if [ -n "$JOURNAL_LABEL" ] - then - chsmack -a "$JOURNAL_LABEL" $dbpath.$name.db-journal - fi + # The Tizen 3.0 smack domains have not been estableshed yet, + # which requires all files to be set for floor. Once the + # tizen security team is defined a domain structure then + # the following can be reenabled using the appropriate names + ## restore smack label + #if [ -n "$DB_LABEL" ] + #then + # chsmack -a "$DB_LABEL" $dbpath.$name.db + #fi + ## restore smack label + #if [ -n "$JOURNAL_LABEL" ] + #then + # chsmack -a "$JOURNAL_LABEL" $dbpath.$name.db-journal + #fi } for name in wrt diff --git a/packaging/wrt-commons.spec b/packaging/wrt-commons.spec index 084f3ce..b833d98 100644 --- a/packaging/wrt-commons.spec +++ b/packaging/wrt-commons.spec @@ -130,13 +130,16 @@ else cp /usr/var/lib/dbus/machine-id /var/lib/dbus/ fi -# Set Smack label for db files -chsmack -a 'wrt-commons::db_wrt' /opt/dbspace/.wrt.db -chsmack -a 'wrt-commons::db_wrt' /opt/dbspace/.wrt.db-journal -chsmack -a 'wrt-commons::db_wrt' /opt/usr/dbspace/.wrt_custom_handler.db -chsmack -a 'wrt-commons::db_wrt' /opt/usr/dbspace/.wrt_custom_handler.db-journal -chsmack -a '*' /opt/usr/dbspace/.wrt_i18n.db -chsmack -a '*' /opt/usr/dbspace/.wrt_i18n.db-journal +# Until the Tizen 3.0 smack domains have been defined, all +# files must use floor or else the system will fall on its face. +# Reenable the following using whatever ends up being the accepted +# domain structure once that has been established. +# chsmack -a 'wrt-commons::db_wrt' /opt/dbspace/.wrt.db +# chsmack -a 'wrt-commons::db_wrt' /opt/dbspace/.wrt.db-journal +# chsmack -a 'wrt-commons::db_wrt' /opt/usr/dbspace/.wrt_custom_handler.db +# chsmack -a 'wrt-commons::db_wrt' /opt/usr/dbspace/.wrt_custom_handler.db-journal +# chsmack -a '*' /opt/usr/dbspace/.wrt_i18n.db +# chsmack -a '*' /opt/usr/dbspace/.wrt_i18n.db-journal echo "[WRT] wrt-commons postinst done ..." -- 2.34.1