From: jin-gyu.kim Date: Thu, 18 Aug 2016 09:06:11 +0000 (+0900) Subject: Change SQL query command in smack rule test. X-Git-Tag: submit/tizen/20160829.005907~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a46f947920c0902768a258374a9c46e13cf1d55c;p=platform%2Fcore%2Fsecurity%2Fsecurity-config.git Change SQL query command in smack rule test. - Security-manager.db changes the name of db view. Change-Id: I5fd08d04db1bb07595ed3033c7b4cc1229cecc6c --- diff --git a/test/smack_rule_test/checksmackrule_loaded.sh b/test/smack_rule_test/checksmackrule_loaded.sh index 180719e..e37d56e 100755 --- a/test/smack_rule_test/checksmackrule_loaded.sh +++ b/test/smack_rule_test/checksmackrule_loaded.sh @@ -156,7 +156,7 @@ function RULE_CHECK then pkgname=$(/bin/echo $2 | /usr/bin/cut -f 5 -d ":") appname=$(/bin/echo $1 | /usr/bin/cut -f 5 -d ":") - pkgname_db=$(/usr/bin/sqlite3 $dbpath "select DISTINCT pkg_name from app_pkg_view where app_name='$appname';") + pkgname_db=$(/usr/bin/sqlite3 $dbpath "select DISTINCT pkg_name from user_app_pkg_view where app_name='$appname';") if [ "$pkgname" == "$pkgname_db" ] then @@ -175,7 +175,7 @@ function RULE_CHECK then pkgname=$(/bin/echo $2 | /usr/bin/cut -f 5 -d ":") appname=$(/bin/echo $1 | /usr/bin/cut -f 5 -d ":") - pkgname_db=$(/usr/bin/sqlite3 $dbpath "select DISTINCT pkg_name from app_pkg_view where app_name='$appname';") + pkgname_db=$(/usr/bin/sqlite3 $dbpath "select DISTINCT pkg_name from user_app_pkg_view where app_name='$appname';") if [ "$pkgname" == "$pkgname_db" ] then @@ -189,7 +189,7 @@ function RULE_CHECK then pkgname=$(/bin/echo $2 | /usr/bin/cut -f 5 -d ":") appname=$(/bin/echo $1 | /usr/bin/cut -f 5 -d ":") - pkgname_db=$(/usr/bin/sqlite3 $dbpath "select DISTINCT pkg_name from app_pkg_view where app_name='$appname';") + pkgname_db=$(/usr/bin/sqlite3 $dbpath "select DISTINCT pkg_name from user_app_pkg_view where app_name='$appname';") if [ "$pkgname" == "$pkgname_db" ] then @@ -203,7 +203,7 @@ function RULE_CHECK then authorID=$(/bin/echo $2 | /usr/bin/cut -f 5 -d ":") appname=$(/bin/echo $1 | /usr/bin/cut -f 5 -d ":") - authorID_db=$(/usr/bin/sqlite3 $dbpath "select DISTINCT author_id from app_pkg_view where app_name='$appname';") + authorID_db=$(/usr/bin/sqlite3 $dbpath "select DISTINCT author_id from user_app_pkg_view where app_name='$appname';") if [ "$authorID" == "$authorID_db" ] then @@ -362,8 +362,8 @@ function RULE_CHECK then appname1=$(/bin/echo $1 | /usr/bin/cut -f 5 -d ":") appname2=$(/bin/echo $2 | /usr/bin/cut -f 5 -d ":") - pkgname1=$(/usr/bin/sqlite3 $dbpath "select DISTINCT pkg_name from app_pkg_view where app_name='$appname1';") - pkgname2=$(/usr/bin/sqlite3 $dbpath "select DISTINCT pkg_name from app_pkg_view where app_name='$appname2';") + pkgname1=$(/usr/bin/sqlite3 $dbpath "select DISTINCT pkg_name from user_app_pkg_view where app_name='$appname1';") + pkgname2=$(/usr/bin/sqlite3 $dbpath "select DISTINCT pkg_name from user_app_pkg_view where app_name='$appname2';") if [ "$pkgname1" == "$pkgname2" ] && [ "$3" == "rwxat" ] then return 0 diff --git a/test/smack_rule_test/checksmackrule_saved.sh b/test/smack_rule_test/checksmackrule_saved.sh index f42dd70..131d1e0 100755 --- a/test/smack_rule_test/checksmackrule_saved.sh +++ b/test/smack_rule_test/checksmackrule_saved.sh @@ -157,7 +157,7 @@ function RULE_CHECK then pkgname=$(/bin/echo $2 | /usr/bin/cut -f 5 -d ":") appname=$(/bin/echo $1 | /usr/bin/cut -f 5 -d ":") - pkgname_db=$(/usr/bin/sqlite3 $dbpath "select DISTINCT pkg_name from app_pkg_view where app_name='$appname';") + pkgname_db=$(/usr/bin/sqlite3 $dbpath "select DISTINCT pkg_name from user_app_pkg_view where app_name='$appname';") if [ "$pkgname" == "$pkgname_db" ] then @@ -176,7 +176,7 @@ function RULE_CHECK then pkgname=$(/bin/echo $2 | /usr/bin/cut -f 5 -d ":") appname=$(/bin/echo $1 | /usr/bin/cut -f 5 -d ":") - pkgname_db=$(/usr/bin/sqlite3 $dbpath "select DISTINCT pkg_name from app_pkg_view where app_name='$appname';") + pkgname_db=$(/usr/bin/sqlite3 $dbpath "select DISTINCT pkg_name from user_app_pkg_view where app_name='$appname';") if [ "$pkgname" == "$pkgname_db" ] then @@ -190,7 +190,7 @@ function RULE_CHECK then pkgname=$(/bin/echo $2 | /usr/bin/cut -f 5 -d ":") appname=$(/bin/echo $1 | /usr/bin/cut -f 5 -d ":") - pkgname_db=$(/usr/bin/sqlite3 $dbpath "select DISTINCT pkg_name from app_pkg_view where app_name='$appname';") + pkgname_db=$(/usr/bin/sqlite3 $dbpath "select DISTINCT pkg_name from user_app_pkg_view where app_name='$appname';") if [ "$pkgname" == "$pkgname_db" ] then @@ -204,7 +204,7 @@ function RULE_CHECK then authorID=$(/bin/echo $2 | /usr/bin/cut -f 5 -d ":") appname=$(/bin/echo $1 | /usr/bin/cut -f 5 -d ":") - authorID_db=$(/usr/bin/sqlite3 $dbpath "select DISTINCT author_id from app_pkg_view where app_name='$appname';") + authorID_db=$(/usr/bin/sqlite3 $dbpath "select DISTINCT author_id from user_app_pkg_view where app_name='$appname';") if [ "$authorID" == "$authorID_db" ] then @@ -364,8 +364,8 @@ function RULE_CHECK then appname1=$(/bin/echo $1 | /usr/bin/cut -f 5 -d ":") appname2=$(/bin/echo $2 | /usr/bin/cut -f 5 -d ":") - pkgname1=$(/usr/bin/sqlite3 $dbpath "select DISTINCT pkg_name from app_pkg_view where app_name='$appname1';") - pkgname2=$(/usr/bin/sqlite3 $dbpath "select DISTINCT pkg_name from app_pkg_view where app_name='$appname2';") + pkgname1=$(/usr/bin/sqlite3 $dbpath "select DISTINCT pkg_name from user_app_pkg_view where app_name='$appname1';") + pkgname2=$(/usr/bin/sqlite3 $dbpath "select DISTINCT pkg_name from user_app_pkg_view where app_name='$appname2';") if [ "$pkgname1" == "$pkgname2" ] && [ "$3" == "rwxat-" ] then return 0