Whamcloud - gitweb
LU-16444 enc: null-enc names cannot be digested form
authorSebastien Buisson <sbuisson@ddn.com>
Wed, 4 Jan 2023 15:10:02 +0000 (16:10 +0100)
committerAndreas Dilger <adilger@whamcloud.com>
Thu, 12 Jan 2023 01:08:24 +0000 (01:08 +0000)
commitf04fedc09d6f2580a3813d99685b510241ef86f4
tree5039b52fd79644bb927dae5a0b50999642cdf789
parent3903f67feb56e4351f22a9d7f12802d70346e3f5
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 '_'.

Lustre-change: https://review.whamcloud.com/49550
Lustre-commit: TBD (5487e006b1ca152be665729a4fdf273c6109f0f4)

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/ex/lustre-release/+/49552
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/llite/crypto.c
lustre/tests/sanity-sec.sh