mesh: Fix Key Ring permissions for local nodes
authorBrian Gix <brian.gix@intel.com>
Thu, 26 Sep 2019 18:14:44 +0000 (11:14 -0700)
committerAnupam Roy <anupam.r@samsung.com>
Tue, 17 Dec 2019 16:52:36 +0000 (22:22 +0530)
commitae4c763b2bb3098dd18fed1a71264b1c48abeded
tree94ae74b8a7620babfa8a8bc72d31b62193e2e555
parent80183f0269ab72fe75f2a6b7c77f977e5f318d5d
mesh: Fix Key Ring permissions for local nodes

We do *not* automatically create populated key rings for imported or
joined nodes, but we also do not *forbid* any node from adding a key
in it's possesion to the local key ring.

There are two (known) use cases for Import()

1. Node previously existed on a different physical piece of hardware,
and is being migrated to this daemon.

2. Node was newly provisioned Out-Of-Band, and this is the net result
of the provisioning.

In *neither* case is it a given that the Node should be able to
provision another node (the effect of adding the Net Key to the key
ring). In neither case is it a given that the Node should be able to
modify it's own Config Server states (the effect of adding it's
Device Key to the key ring).

Change-Id: Ida5adbedbb6757a36a7f0b8c803fe66e4c7d4cf0
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
mesh/manager.c
mesh/node.c