mesh: Fix keyring app keys directory iteration 35/228935/1
authorInga Stotland <inga.stotland@intel.com>
Fri, 7 Feb 2020 06:39:45 +0000 (22:39 -0800)
committerAnupam Roy <anupam.r@samsung.com>
Thu, 26 Mar 2020 10:25:49 +0000 (15:55 +0530)
commit115e1da1079c41eebfbbb7d11f23f59d15acbcf9
treedc860480f26cff36d65cf136a3cfc0c5122bfd6f
parent35ff86ed00102a1e429f6583cbdf53abaa30e465
mesh: Fix keyring app keys directory iteration

This fixes how app key files are accessed when finalizing
Key Refresh procedure. Instead of using open(entry->d_name, ...)
to get file descriptor, use openat(dir_fd, entry->d_name, ...)
since entry->d_name contains a relative app key filename, not an
absolute path.

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