return true;
}
+/**
+ * Compares input OicUuid_t struct with OicUuid_t struct which has all zero values.
+ *
+ * @return true if the two OicUuid_t structs are equal, else false.
+ */
+static bool IsUuidAllZero(OicUuid_t *uuid)
+{
+ OicUuid_t allZeroUuid = {.id={0}};
+ return UuidCmp(&allZeroUuid, uuid);
+}
+
void SetPolicyEngineState(PEContext_t *context, const PEState_t state)
{
if (NULL == context)
return retVal;
}
- /*
- if(OC_STACK_OK == GetDoxmDevOwnerId(&ownerid))
+ // Check for all zero UUID
+ if (true == IsUuidAllZero(&context->subject))
{
- retVal = UuidCmp(&context->subject, &ownerid);
+ OIC_LOG_V(DEBUG, TAG, "%s: UUID is all zero", __func__);
+ return retVal;
}
- */
// TODO: Added as workaround for CTT
OicSecDoxm_t* doxm = (OicSecDoxm_t*) GetDoxmResourceData();
return retVal;
}
+ // Check for all zero UUID
+ if (true == IsUuidAllZero(&context->subject))
+ {
+ OIC_LOG_V(DEBUG, TAG, "%s: UUID is all zero", __func__);
+ return retVal;
+ }
+
if(IsSubOwner(&context->subject))
{
retVal = true;
return false;
}
+ // Check for all zero UUID
+ if (true == IsUuidAllZero(&context->subject))
+ {
+ OIC_LOG_V(DEBUG, TAG, "%s: UUID is all zero", __func__);
+ return retVal;
+ }
+
if((OIC_R_ACL_TYPE <= context->resourceType) && \
(OIC_SEC_SVR_TYPE_COUNT > context->resourceType))
{