Fix security-test 15/104015/1 accepted/tizen/3.0/common/20161213.163437 accepted/tizen/3.0/ivi/20161213.023941 accepted/tizen/3.0/mobile/20161213.023848 accepted/tizen/3.0/tv/20161213.023910 accepted/tizen/3.0/wearable/20161213.023922 submit/tizen_3.0/20161212.020133
authorjin-gyu.kim <jin-gyu.kim@samsung.com>
Mon, 12 Dec 2016 06:00:35 +0000 (15:00 +0900)
committerjin-gyu.kim <jin-gyu.kim@samsung.com>
Mon, 12 Dec 2016 06:00:41 +0000 (15:00 +0900)
- Add rule ~PROCESS ~PROCESS, rxxat for the same non-hybrid app label.

Change-Id: I749a37bc2d2b63e31ceeb187bc466b1a2c191e1b

test/smack_rule_test/checksmackrule_loaded.sh
test/smack_rule_test/checksmackrule_saved.sh

index f8e12d149a8b791526a0418e239936184b00c6c9..99f213f6391c1f9b662cc3612e13ba5456e324dd 100755 (executable)
@@ -533,6 +533,15 @@ function RULE_CHECK
                then
                        return 0
                fi
+       # ~PROCESS ~PROCESS, same label, rwxat
+       elif [[ "$1" == "User::Pkg::"* ]] && [ "$1" == "$2" ]
+       then
+               pkgname=$(/bin/echo ${1##User::Pkg::})
+               ishybrid=$(/usr/bin/sqlite3 $dbpath "select DISTINCT is_hybrid from user_app_pkg_view where pkg_name='$pkgname';")
+               if [ "$3" == "rwxat" ] && [ "$ishybrid" == "0" ]
+               then
+                       return 0
+               fi 
        fi
 
        EXCEPTION_CHECK $1 $2 $3
index c7fcdc0f687251463105fa6c13dbc754afd29b68..e6725e9b88f9b349c45ab0d20cb84aa3663b8125 100755 (executable)
@@ -534,6 +534,15 @@ function RULE_CHECK
                then
                        return 0
                fi
+       # ~PROCESS ~PROCESS, same label, rwxat
+       elif [[ "$1" == "User::Pkg::"* ]] && [ "$1" == "$2" ]
+       then
+               pkgname=$(/bin/echo ${1##User::Pkg::})
+               ishybrid=$(/usr/bin/sqlite3 $dbpath "select DISTINCT is_hybrid from user_app_pkg_view where pkg_name='$pkgname';")
+               if [ "$3" == "rwxat-" ] && [ "$ishybrid" == "0" ]
+               then
+                       return 0
+               fi 
        fi
 
        EXCEPTION_CHECK $1 $2 $3