validStringFlag = false;
validLevelFlag = true;
+ String privilegeURI = L"http://tizen.org/privilege/";
+
String* pTempString = (String*) pEnum->GetCurrent();
+
+ if ((pTempString->GetLength()) < (privilegeURI.GetLength()))
+ {
+ SysLogException(NID_SEC, E_INVALID_ARG, "[E_INVALID_ARG] Invalid privilege string : %ls", pTempString->GetPointer());
+ resultFlag = false;
+ continue;
+ }
+
+ String uriString;
+ pTempString->SubString(0, privilegeURI.GetLength(), uriString);
+
+ if (!(uriString.Equals(privilegeURI, true)))
+ {
+ SysLogException(NID_SEC, E_INVALID_ARG, "[E_INVALID_ARG] Invalid privilege string : %ls", pTempString->GetPointer());
+ resultFlag = false;
+ continue;
+ }
+
+ String privilegeString;
+ pTempString->SubString(privilegeURI.GetLength(), pTempString->GetLength()-privilegeURI.GetLength(), privilegeString);
+
for (index = 0; index < _MAX_PRIVILEGE_ENUM; index++)
{
- if (wcscmp(privilegeListTable[index].privilegeString, pTempString->GetPointer()) == 0)
+ if (wcscmp(privilegeListTable[index].privilegeString, privilegeString.GetPointer()) == 0)
{
validStringFlag = true;
privilegeEnum = static_cast< int >(privilegeListTable[index].privilege);