Snapshot names are visible within the .snap directory
as dir entries. They can be created by a client that
has an fscrypt key present and also by the manager who
does not have any key. While the client with the key
can create an encrypted name the manager cannot.
Standardize functionality of these semantics to the
common of the two.
Signed-off-by: Christopher Hoffman <choffman@redhat.com>
auto [it, b] = inode_map.try_emplace(vino, nullptr);
if (b) {
in = new Inode(this, vino, &diri->layout);
- in->fscrypt_auth = diri->fscrypt_auth; /* borrow parent fscrypt data */
- in->fscrypt_ctx = in->init_fscrypt_ctx(fscrypt.get());
refresh_snapdir_attrs(in, diri.get());
diri->flags |= I_SNAPDIR_OPEN;
it->second = in;