removing chsmack 51/5451/1
authorAlexandru Cornea <alexandru.cornea@intel.com>
Wed, 3 Jul 2013 10:30:48 +0000 (13:30 +0300)
committerAlexandru Cornea <alexandru.cornea@intel.com>
Wed, 3 Jul 2013 10:30:48 +0000 (13:30 +0300)
etc/wrt_commons_create_clean_db.sh
packaging/wrt-commons.spec

index 72e9dd7..399608d 100755 (executable)
@@ -22,18 +22,9 @@ function create_db {
     dbpath=$2
     # extract smack label before removal
     DB_LABEL=""
-    if [ -f $dbpath.$name.db ]
-    then
-        DB_LABEL=`chsmack $dbpath.$name.db | sed -r "s/.*access=\"([^\"]+)\"/\1/"`
-    fi
     rm -f $dbpath.$name.db
-
     # extract smack label before removal
     JOURNAL_LABEL=""
-    if [ -f $dbpath.$name.db-journal ]
-    then
-        JOURNAL_LABEL=`chsmack $dbpath.$name.db-journal | sed -r "s/.*access=\"([^\"]+)\"/\1/"`
-    fi
     rm -f $dbpath.$name.db-journal
 
     SQL=".read /usr/share/wrt-engine/"$name"_db.sql"
@@ -47,16 +38,7 @@ 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
 }
 
 for name in wrt
index 97ae645..917a682 100644 (file)
@@ -117,10 +117,6 @@ else
 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_custom_handler' /opt/usr/dbspace/.wrt_custom_handler.db
-chsmack -a 'wrt-commons::db_wrt_custom_handler' /opt/usr/dbspace/.wrt_custom_handler.db-journal
 
 echo "[WRT] wrt-commons postinst done ..."