]> git.apps.os.sepia.ceph.com Git - ceph-client.git/commit
ceph: create symlinks with encrypted and base64-encoded targets
authorJeff Layton <jlayton@kernel.org>
Thu, 3 Sep 2020 17:31:10 +0000 (13:31 -0400)
committerXiubo Li <xiubli@redhat.com>
Thu, 18 Aug 2022 02:59:52 +0000 (10:59 +0800)
commit11766824d21f2ae6c5b360f26077eb3ec24d6bce
treedcc8fa91ffbbc7dcb09b6782472209d002aa36e7
parent40de1778a2aa135c60d8e4f799d0fc04c907853b
ceph: create symlinks with encrypted and base64-encoded targets

When creating symlinks in encrypted directories, encrypt and
base64-encode the target with the new inode's key before sending to the
MDS.

When filling a symlinked inode, base64-decode it into a buffer that
we'll keep in ci->i_symlink. When get_link is called, decrypt the buffer
into a new one that will hang off i_link.

Reviewed-by: Xiubo Li <xiubli@redhat.com>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
fs/ceph/crypto.c
fs/ceph/dir.c
fs/ceph/inode.c