Update security-test(smack-rule, smack-basic) scripts 59/97359/2
authorjooseong lee <jooseong.lee@samsung.com>
Mon, 14 Nov 2016 04:02:34 +0000 (13:02 +0900)
committerjooseong lee <jooseong.lee@samsung.com>
Mon, 14 Nov 2016 04:21:46 +0000 (13:21 +0900)
* Application process's prefix label was changed. (User::App -> User::Pkg)
 - https://review.tizen.org/gerrit/#/c/88317/
* Added 'l' permission to SharedRO rule
 - https://review.tizen.org/gerrit/#/c/96752/

Change-Id: I9b139ebb41599ec0e33edf527732eae4b0e2f8c2
Signed-off-by: jooseong lee <jooseong.lee@samsung.com>
test/smack_basic_test/smack_basic_test.sh
test/smack_rule_test/checksmackrule_loaded.sh
test/smack_rule_test/checksmackrule_saved.sh

index 215be37e0909a5e33938d15045c18f006fa47d8d..ce7d86e00e9c6b9db5fe57d31b9b3306f363a654 100644 (file)
@@ -28,16 +28,16 @@ function chk_floor_smack_rule
        /bin/echo "" >> $log_file
        /bin/echo "2. Smack rule for floor label check" >> $log_file    
 
-       while read app_name
+       while read pkg_name
        do
-               app_name_cut=$(/bin/echo ${app_name:4}) # cut "app_"
-               rule_filtered=$(/bin/cat $smack_rule_path | grep "User::App::$app_name_cut _ l")
+               pkg_name_cut=$(/bin/echo ${pkg_name:4}) # cut "pkg_"
+               rule_filtered=$(/bin/cat $smack_rule_path | grep "User::Pkg::$pkg_name_cut _ l")
                if [ "$rule_filtered" = "" ]
                then
                        flag=1
-                       /bin/echo "User::App::$app_name_cut _ l is not existed" >> $log_file
+                       /bin/echo "User::Pkg::$pkg_name_cut _ l is not existed" >> $log_file
                fi
-       done < <( /bin/ls /opt/var/security-manager/rules | grep "app_")
+       done < <( /bin/ls /opt/var/security-manager/rules | grep "pkg_")
 
        if [ $flag -eq 0 ]
        then
index 8eb0d66fb7882ef9345a4e98ac758cff7a898775..f8e12d149a8b791526a0418e239936184b00c6c9 100755 (executable)
@@ -129,7 +129,7 @@ function RULE_CHECK
        #~PROCESS~ ~PATH_SHARED_RO~ rx (other)
        elif [[ "$1" == "User::Pkg::"* ]] && [[ "$2" == "User::Pkg"*"::SharedRO" ]] && [[ "$2" != "$1""::SharedRO" ]]
        then
-               if [ "$3" == "rx" ]
+               if [ "$3" == "rxl" ]
                then
                        return 0
                fi
index c5393622c11d1034253ae34e8c0854dc2f01b30b..c7fcdc0f687251463105fa6c13dbc754afd29b68 100755 (executable)
@@ -130,7 +130,7 @@ function RULE_CHECK
        #~PROCESS~ ~PATH_SHARED_RO~ rx (other)
        elif [[ "$1" == "User::Pkg::"* ]] && [[ "$2" == "User::Pkg"*"::SharedRO" ]] && [[ "$2" != "$1""::SharedRO" ]]
        then
-               if [ "$3" == "r-x---" ]
+               if [ "$3" == "r-x--l" ]
                then
                        return 0
                fi