Whamcloud - gitweb
LU-16444 enc: null-enc names cannot be digested form 50/49550/4
authorSebastien Buisson <sbuisson@ddn.com>
Wed, 4 Jan 2023 15:10:02 +0000 (16:10 +0100)
committerOleg Drokin <green@whamcloud.com>
Thu, 19 Jan 2023 15:27:10 +0000 (15:27 +0000)
commita0132a79df9b59d5d9b674665daf6cdbd79128a8
treeb0a2fc2c2292fb1077267aef775d36c6c77f967d
parent6f490275b0e0455a431707775d685fb3df1d322d
LU-16444 enc: null-enc names cannot be digested form

When encrypted files have their names encrypted, long names are in
digested form in case access is done without the encryption key. The
digest is base64-encoded, and prepended with '_'.
With null encryption for file names, names are always plain text. In
this case, a legitimate '_' at the start of a name must not be
interpreted as a digested form.

sanity-sec test_54 is improved to test the case of a file whose name
starts with '_'.

Fixes: f18c87cb53 ("LU-13717 sec: handle null algo for filename encryption")
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: Idaad186afd06cfbabbe1d13e78f083d12876c8ff
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49550
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: jsimmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/llite/crypto.c
lustre/tests/sanity-sec.sh