Keep ACL rowneruuid when POST payload does not have rowneruuid
authorJongmin Choi <jminl.choi@samsung.com>
Fri, 14 Oct 2016 03:52:46 +0000 (12:52 +0900)
committerRandeep Singh <randeep.s@samsung.com>
Fri, 14 Oct 2016 08:44:03 +0000 (08:44 +0000)
Maintains the ACL rowneruuid when the payload of POST request
does not have rowneruuid

Change-Id: I52177b84ba9ced8b1078b3edea12256e23d6dfd8
Signed-off-by: Jongmin Choi <jminl.choi@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/13257
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: dongik Lee <dongik.lee@samsung.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
(cherry picked from commit b012422858a1834d1b3868dbf51f67bcebd613c1)
Reviewed-on: https://gerrit.iotivity.org/gerrit/13271

resource/csdk/security/src/aclresource.c

index a8485af..8f8845f 100644 (file)
@@ -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))