Grant Installer application access to WRT I18N DB
authorZbigniew Kostrzewa <z.kostrzewa@samsung.com>
Tue, 8 Oct 2013 10:33:39 +0000 (12:33 +0200)
committerGerrit Code Review <gerrit@gerrit.vlan144.tizendev.org>
Tue, 15 Oct 2013 00:33:11 +0000 (00:33 +0000)
[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
packaging/wrt-commons.spec

index 893631c664ec95febe9a14bf736337f07dddd351..6a2a38988b0f18e0fec99cdecf6b6d9daaf6aa6d 100755 (executable)
@@ -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
 }
 
index 21c4827373ff8127e542782b73cd63719ee9d9a1..3eadc8b5b90aae8e3bd1b4f0f16e68c9f76f0cd3 100644 (file)
@@ -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 ..."