diff options
author | Brian Gix <brian.gix@intel.com> | 2019-09-26 11:14:44 -0700 |
---|---|---|
committer | Brian Gix <brian.gix@intel.com> | 2019-10-01 10:42:02 -0700 |
commit | c75605726e7281b68cc4dee4e895d3386ba7708f (patch) | |
tree | 597b268960fc8bb81427d201840d011f868ba42b /mesh/manager.c | |
parent | 0cdcff2f90f0a2425527adafdb14cdf6cd033a99 (diff) | |
download | bluez-c75605726e7281b68cc4dee4e895d3386ba7708f.tar.gz |
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).
Diffstat (limited to 'mesh/manager.c')
-rw-r--r-- | mesh/manager.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/mesh/manager.c b/mesh/manager.c index 501ec10fe..633597659 100644 --- a/mesh/manager.c +++ b/mesh/manager.c @@ -282,7 +282,6 @@ static struct l_dbus_message *import_node_call(struct l_dbus *dbus, void *user_data) { struct mesh_node *node = user_data; - struct mesh_net *net = node_get_net(node); struct l_dbus_message_iter iter_key; uint16_t primary; uint8_t num_ele; @@ -298,10 +297,6 @@ static struct l_dbus_message *import_node_call(struct l_dbus *dbus, return dbus_error(msg, MESH_ERROR_INVALID_ARGS, "Bad device key"); - if (mesh_net_is_local_address(net, primary, num_ele)) - return dbus_error(msg, MESH_ERROR_INVALID_ARGS, - "Cannot overwrite local device key"); - if (!keyring_put_remote_dev_key(node, primary, num_ele, key)) return dbus_error(msg, MESH_ERROR_FAILED, NULL); |