From f866f5a3ac22d17a0d520a69b8bfe7eb9189df12 Mon Sep 17 00:00:00 2001 From: Jongmin Choi Date: Fri, 14 Oct 2016 12:52:46 +0900 Subject: [PATCH] Keep ACL rowneruuid when POST payload does not have rowneruuid Maintains the ACL rowneruuid when the payload of POST request does not have rowneruuid Change-Id: I52177b84ba9ced8b1078b3edea12256e23d6dfd8 Signed-off-by: Jongmin Choi Reviewed-on: https://gerrit.iotivity.org/gerrit/13257 Tested-by: jenkins-iotivity Reviewed-by: dongik Lee Reviewed-by: Randeep Singh (cherry picked from commit b012422858a1834d1b3868dbf51f67bcebd613c1) Reviewed-on: https://gerrit.iotivity.org/gerrit/13271 --- resource/csdk/security/src/aclresource.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/resource/csdk/security/src/aclresource.c b/resource/csdk/security/src/aclresource.c index a8485af..8f8845f 100644 --- a/resource/csdk/security/src/aclresource.c +++ b/resource/csdk/security/src/aclresource.c @@ -1253,6 +1253,10 @@ OicSecAcl_t* CBORPayloadToAcl(const uint8_t *cborPayload, const size_t size) VERIFY_SUCCESS(TAG, ret == OC_STACK_OK, ERROR); OICFree(stRowner); } + else if (NULL != gAcl) + { + memcpy(&(acl->rownerID), &(gAcl->rownerID), sizeof(OicUuid_t)); + } OICFree(tagName); } if (cbor_value_is_valid(&aclMap)) -- 2.7.4