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 06:30:15 +0000 (06:30 +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>
resource/csdk/security/src/aclresource.c

index a8485af02644ed04bb330df594303a7d8aa545c7..8f8845f662779b3ef9594eecc882afedaf13484d 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))