]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ceph: add helpers for converting names for userland presentation
authorJeff Layton <jlayton@kernel.org>
Fri, 26 Mar 2021 16:26:18 +0000 (12:26 -0400)
committerIlya Dryomov <idryomov@gmail.com>
Thu, 24 Aug 2023 09:24:34 +0000 (11:24 +0200)
commit457117f077c6749d1e28469eae91fb69c9806768
tree08b274708153fd022c4a0aaed67892566bb53f98
parentc526760181ca083dbd607d2e694b43080a8b1585
ceph: add helpers for converting names for userland presentation

Define a new ceph_fname struct that we can use to carry information
about encrypted dentry names. Add helpers for working with these
objects, including ceph_fname_to_usr which formats an encrypted filename
for userland presentation.

[ xiubli: fix resulting name length check -- neither name_len nor
  ctext_len should exceed NAME_MAX ]

Signed-off-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: Xiubo Li <xiubli@redhat.com>
Reviewed-and-tested-by: Luís Henriques <lhenriques@suse.de>
Reviewed-by: Milind Changire <mchangir@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/crypto.c
fs/ceph/crypto.h