Modify to update default ACL of security resource
authorleechul <chuls.lee@samsung.com>
Wed, 9 Mar 2016 09:57:28 +0000 (18:57 +0900)
committerRandeep Singh <randeep.s@samsung.com>
Fri, 11 Mar 2016 04:11:31 +0000 (04:11 +0000)
commitc415aa517e1056150890d136f9be85aeea5aebf2
tree1c423e970ae60cbf711dfbc81fd2e69747607be1
parentd7fe6a944aea4bbd047456c280854fcb5361f263
Modify to update default ACL of security resource
after ownership transfer is successfully completed.

Current default ACL of security resource can make a access permission issues.
If we do not update defualt ACL, anonymous user can access security resource.

For this reason, If ownership trnasfer is successfully completed,
the securiy resource ACL should be updated as follows:
{
  "sub":"Kg==",
  "rsrc":[
    "/oic/sec/doxm",
    "/oic/sec/pstat"
  ],
  "perms":2,
  "ownrs":[
    "cmFuZG9tUGluRGV2VVVJRA=="
  ]
},

In order to resolve this issues,
I've modified SRM to update security resource ACL
when 'owned' property of doxm is changed as 'true'.

[Patch #1] Intial upload
[Patch #2] Remove compile errors
[Patch #3] Update comments in source code.
[Patch #4] Update comment in source code.
[Patch #5] Retrigger
[Patch #6] Fix the bug which is occurred due to operator precedence.
[Patch #7] Remove default ACL provisioning step in ownership transfer.

Change-Id: Ia5eb62693168788cf1a607bb95ce97a44ce5b15d
Signed-off-by: leechul <chuls.lee@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/5625
Reviewed-by: Kyungsun Cho <goodsun.cho@samsung.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
Tested-by: Randeep Singh <randeep.s@samsung.com>
(cherry picked from commit c35094220f8fcfeaa40c4befc9e9c1883756fe3a)
Reviewed-on: https://gerrit.iotivity.org/gerrit/5703
resource/csdk/security/include/internal/aclresource.h
resource/csdk/security/provisioning/src/ownershiptransfermanager.c
resource/csdk/security/src/aclresource.c
resource/csdk/security/src/doxmresource.c