From 5882fb859cf76bce2fb67882c5b43da0c552d5da Mon Sep 17 00:00:00 2001 From: Zbigniew Kostrzewa Date: Tue, 8 Oct 2013 12:33:39 +0200 Subject: [PATCH] Grant Installer application access to WRT I18N DB [Issue#] WGL-560, WGL-563 [Problem] Installation of test widgets included in above issues fail [Cause] Installer application does not have access to WRT I18N DB [Solution] Since there is no way to add appropriate permissions to Installer application from WRT and having in mind that WRT I18N DB does not contain any sensitive data it has been decided to grant access to this DB to the whole "world" (by setting "*" SMACK label on this DB). [Verification] 1. Build repository. 2. Install widgets from WGL-560 using wrt-installer launched directly in command line. Change-Id: I214f83aa2bcae8de5cba48953d0d0237a54d60e8 --- etc/wrt_commons_create_clean_db.sh | 4 ++-- packaging/wrt-commons.spec | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/etc/wrt_commons_create_clean_db.sh b/etc/wrt_commons_create_clean_db.sh index 893631c..6a2a389 100755 --- a/etc/wrt_commons_create_clean_db.sh +++ b/etc/wrt_commons_create_clean_db.sh @@ -51,13 +51,13 @@ function create_db { # restore smack label if [ -n "$DB_LABEL" ] then - chsmack -a $DB_LABEL $dbpath.$name.db + chsmack -a "$DB_LABEL" $dbpath.$name.db fi # restore smack label if [ -n "$JOURNAL_LABEL" ] then - chsmack -a $JOURNAL_LABEL $dbpath.$name.db-journal + chsmack -a "$JOURNAL_LABEL" $dbpath.$name.db-journal fi } diff --git a/packaging/wrt-commons.spec b/packaging/wrt-commons.spec index 21c4827..3eadc8b 100644 --- a/packaging/wrt-commons.spec +++ b/packaging/wrt-commons.spec @@ -137,8 +137,8 @@ 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 'wrt-commons::db_wrt_i18n' /opt/usr/dbspace/.wrt_i18n.db -chsmack -a 'wrt-commons::db_wrt_i18n' /opt/usr/dbspace/.wrt_i18n.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