summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhb.min <hb.min@samsung.com>2013-10-29 16:51:02 +0900
committerhb.min <hb.min@samsung.com>2013-10-29 16:53:33 +0900
commit200d5aaec30ac837e331dc01ef63367e87400f16 (patch)
treeca9cfaedfaceb68b22c12dae1e2e46c7a2887681
parente3dc2b32827827741e1bf4cbe36c92fc69e2b798 (diff)
downloadinstaller-200d5aaec30ac837e331dc01ef63367e87400f16.tar.gz
installer-200d5aaec30ac837e331dc01ef63367e87400f16.tar.bz2
installer-200d5aaec30ac837e331dc01ef63367e87400f16.zip
Remove the temporary code for unauthorized applicationsubmit/tizen_2.2/20131107.0620162.2.1_releasetizen_2.2
Change-Id: I7c7c5e8270481711451e8084aaafc4f269c92623 Signed-off-by: hb.min <hb.min@samsung.com>
-rwxr-xr-xinc/InstallerDefs.h2
-rwxr-xr-xsrc/XmlHandler/PrivilegeHandler.cpp69
-rw-r--r--src/XmlHandler/PrivilegeHandler.h2
3 files changed, 8 insertions, 65 deletions
diff --git a/inc/InstallerDefs.h b/inc/InstallerDefs.h
index 6110c6d..5d45935 100755
--- a/inc/InstallerDefs.h
+++ b/inc/InstallerDefs.h
@@ -23,7 +23,7 @@
#include "InstallerUtil.h"
-#define OSP_INSTALLER_VERSION "version=[20131029.1]"
+#define OSP_INSTALLER_VERSION "version=[20131029.2]"
#define DIR_BIN L"/bin"
#define DIR_INFO L"/info"
diff --git a/src/XmlHandler/PrivilegeHandler.cpp b/src/XmlHandler/PrivilegeHandler.cpp
index c4109d3..5f8df2b 100755
--- a/src/XmlHandler/PrivilegeHandler.cpp
+++ b/src/XmlHandler/PrivilegeHandler.cpp
@@ -110,13 +110,9 @@ PrivilegeHandler::PickExternalPrivilege(const IList& fullPrivilegeList, int visi
Integer* pPrivilegeLevel = static_cast<Integer*>(privilegeList.GetValue(*pTempString));
TryReturnResultTag(OSP_INSTALLER, pPrivilegeLevel != null, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] An unexpected system error occurred.");
- // To be removed
- if (visibilityLevel != _API_VISIBILITY_NONE)
- {
- int privilegeLevel = pPrivilegeLevel->ToInt();
- TryReturnResultTag(OSP_INSTALLER, privilegeLevel <= visibilityLevel, E_ILLEGAL_ACCESS, E_ILLEGAL_ACCESS,
- "[E_ILLEGAL_ACCESS] The application does not have the privilege level to register [%ls]", pTempString->GetPointer());
- }
+ int privilegeLevel = pPrivilegeLevel->ToInt();
+ TryReturnResultTag(OSP_INSTALLER, privilegeLevel <= visibilityLevel, E_ILLEGAL_ACCESS, E_ILLEGAL_ACCESS,
+ "[E_ILLEGAL_ACCESS] The application does not have the privilege level to register [%ls]", pTempString->GetPointer());
externalPrivilegeList.Add(new String(*pTempString));
}
@@ -131,56 +127,6 @@ PrivilegeHandler::PickExternalPrivilege(const IList& fullPrivilegeList, int visi
}
result
-PrivilegeHandler::GenerateCipherPrivilege(const AppId& appId, const IList& privilegeList, String& encryptedPrivileges, String& checksum, IList& stringPrivilegeList)
-{
- result r = E_SUCCESS;
- byte* pBitwisePrivilege = null;
- int count = 0;
- ArrayList normalPrivilegeList;
-
- encryptedPrivileges.Clear();
- checksum.Clear();
- normalPrivilegeList.Construct();
-
- count = privilegeList.GetCount();
- if (count == 0)
- {
- goto CATCH;
- }
-
- r = PickExternalPrivilege(privilegeList, _API_VISIBILITY_NONE, normalPrivilegeList, stringPrivilegeList);
- if (r == E_SUCCESS)
- {
- pBitwisePrivilege = PackPrivilegeN(normalPrivilegeList);
- TryReturnResultTag(OSP_INSTALLER, pBitwisePrivilege != null, GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
- }
- else
- {
- AppLog("Working with normal PrivilegeDb.");
- pBitwisePrivilege = PackPrivilegeN(privilegeList);
- TryReturnResultTag(OSP_INSTALLER, pBitwisePrivilege != null, GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
- }
-
- r = GetEncryptedBitwise(pBitwisePrivilege, encryptedPrivileges);
- TryCatchTag(OSP_INSTALLER, r == E_SUCCESS, r = E_SYSTEM, "[E_SYSTEM] An unexpected system error occurred.");
-
- r = GetChecksum(appId, pBitwisePrivilege, checksum);
- TryCatchTag(OSP_INSTALLER, r == E_SUCCESS, r = E_SYSTEM, "[E_SYSTEM] An unexpected system error occurred.");
-
- // fall through
-
-CATCH:
-
- if (pBitwisePrivilege)
- {
- free(pBitwisePrivilege);
- }
-
- normalPrivilegeList.RemoveAll(true);
- return r;
-}
-
-result
PrivilegeHandler::GenerateCipherPrivilege(const AppId& appId, const IList& privilegeList, int visibilityLevel, String& encryptedPrivileges, String& checksum, IList& stringPrivilegeList)
{
result r = E_SUCCESS;
@@ -386,13 +332,10 @@ PrivilegeHandler::PackPrivilegeN(const IList& privilegeList, int visibilityLevel
validStringFlag = true;
privilegeEnum = static_cast< int >(privilegeListTable[index].privilege);
- if (visibilityLevel != _API_VISIBILITY_NONE)
+ if (visibilityLevelListTable[privilegeEnum] > visibilityLevel)
{
- if (visibilityLevelListTable[privilegeEnum] > visibilityLevel)
- {
- validLevelFlag = false;
- break;
- }
+ validLevelFlag = false;
+ break;
}
position = privilegeEnum / _BITS_IN_BYTE;
diff --git a/src/XmlHandler/PrivilegeHandler.h b/src/XmlHandler/PrivilegeHandler.h
index e7f022f..2fd1066 100644
--- a/src/XmlHandler/PrivilegeHandler.h
+++ b/src/XmlHandler/PrivilegeHandler.h
@@ -50,8 +50,8 @@ class PrivilegeHandler
{
public:
- static result GenerateCipherPrivilege(const Tizen::App::AppId& appId, const Tizen::Base::Collection::IList& privilegeList, Tizen::Base::String& encryptedPrivileges, Tizen::Base::String& checksum, Tizen::Base::Collection::IList& stringPrivilege);
static result GenerateCipherPrivilege(const Tizen::App::AppId& appId, const Tizen::Base::Collection::IList& privilegeList, int visibilityLevel, Tizen::Base::String& encryptedPrivileges, Tizen::Base::String& checksum, Tizen::Base::Collection::IList& stringPrivilege);
+
private:
static byte* PackPrivilegeN(const Tizen::Base::Collection::IList& privilegeList);
static result PackPrivilegeN(const Tizen::Base::Collection::IList& privilegeList, int visibilityLevel, byte** ppBitwisePrivilege);