From: Vitalii Irkha Date: Mon, 1 Jul 2019 10:33:19 +0000 (+0300) Subject: Check devID for owned device X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a1baadba85d5bbe2245e93109485077f7ed9195e;p=platform%2Fupstream%2Fiotivity.git Check devID for owned device devID should be the same for owned device. https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/529/commits/3b966521b2c0ced20bacce722b741f998ad0391b (cherry picked from 3b966521b2c0ced20bacce722b741f998ad0391b) Change-Id: Icd13121c99faf0cfde92667a5d5fcaf902e0f205 Signed-off-by: Vitalii Irkha Signed-off-by: Sudipto Bal --- diff --git a/resource/csdk/security/src/doxmresource.c b/resource/csdk/security/src/doxmresource.c index 6d35780..e88a381 100644 --- a/resource/csdk/security/src/doxmresource.c +++ b/resource/csdk/security/src/doxmresource.c @@ -1310,6 +1310,13 @@ static OCEntityHandlerResult HandleDoxmPostRequest(OCEntityHandlerRequest * ehRe ehRet = OC_EH_NOT_ACCEPTABLE; goto exit; } + + if(0 != memcmp(&gDoxm->owner.id, &newDoxm->owner.id, sizeof(gDoxm->owner.id))) + { + OIC_LOG(ERROR, TAG, "Not acceptable request for owned property"); + ehRet = OC_EH_NOT_ACCEPTABLE; + } + //Update gDoxm based on newDoxm updateWriteableProperty(newDoxm, gDoxm);