Remove the temporary code for unauthorized application
authorhb.min <hb.min@samsung.com>
Tue, 29 Oct 2013 08:07:19 +0000 (17:07 +0900)
committerhb.min <hb.min@samsung.com>
Tue, 29 Oct 2013 08:07:19 +0000 (17:07 +0900)
Change-Id: I602c66a3a040e41d39e7a583a7861e90142d88be
Signed-off-by: hb.min <hb.min@samsung.com>
src/security/FSec_PrivilegeInfo.cpp

index 48b125b..bc6621c 100644 (file)
@@ -481,13 +481,10 @@ _PrivilegeInfo::HasPrivilege(_Privilege privilege) const
        byte bitwiseTargetPrivilege = 0;
        byte tempBitwisePrivilege = 0;
 
-       if (__apiVisibility != _API_VISIBILITY_NONE) // To be removed
+       if (visibilityLevelListTable[privilege] > __apiVisibility)
        {
-               if (visibilityLevelListTable[privilege] > __apiVisibility)
-               {
-                       SysLog(NID_SEC, "Result : FALSE [Visibility]");
-                       return ret;
-               }
+               SysLog(NID_SEC, "Result : FALSE [Visibility]");
+               return ret;
        }
 
        bitwiseTargetPrivilege = bitwiseTargetPrivilege | (1 << privilegeBit);
@@ -515,12 +512,9 @@ _PrivilegeInfo::HasPrivilegeEx(_Privilege privilege) const
        byte bitwiseTargetPrivilege = 0;
        byte tempBitwisePrivilege = 0;
 
-       if (__apiVisibility != _API_VISIBILITY_NONE) // To be removed
+       if (visibilityLevelListTable[privilege] > __apiVisibility)
        {
-               if (visibilityLevelListTable[privilege] > __apiVisibility)
-               {
-                       return ret;
-               }
+               return ret;
        }
 
        bitwiseTargetPrivilege = bitwiseTargetPrivilege | (1 << privilegeBit);
@@ -571,17 +565,14 @@ _PrivilegeInfo::HasPrivilege(const String& privilege) const
                ret = __privilegeList.ContainsKey(privilege);
        if (ret)
                {
-               if (__apiVisibility != _API_VISIBILITY_NONE) // To be removed
+                       const String* pPrivilegeLevel = static_cast< const String* >(__privilegeList.GetValue(privilege));
+                       SysTryReturn(NID_SEC, pPrivilegeLevel != null, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] An unexpected system error occurred.");
+
+                       int privilegeLevel = GetPrivilegeLevel(*pPrivilegeLevel);
+                       if (privilegeLevel > __apiVisibility)
                        {
-                       const String* pPrivilegeLevel = static_cast< const String* >(__privilegeList.GetValue(privilege));
-                       SysTryReturn(NID_SEC, pPrivilegeLevel != null, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] An unexpected system error occurred.");
-
-                       int privilegeLevel = GetPrivilegeLevel(*pPrivilegeLevel);
-                               if (privilegeLevel > __apiVisibility)
-                               {
-                                       SysLog(NID_SEC, "Result : FALSE [Visibility]");
-                                       return false;
-                               }
+                               SysLog(NID_SEC, "Result : FALSE [Visibility]");
+                               return false;
                        }
 
                        SysLog(NID_SEC, "Result : TRUE");