Whamcloud - gitweb
LU-16444 enc: null-enc names cannot be digested form 51/49551/5
authorSebastien Buisson <sbuisson@ddn.com>
Wed, 4 Jan 2023 15:10:02 +0000 (16:10 +0100)
committerOleg Drokin <green@whamcloud.com>
Tue, 11 Apr 2023 00:04:57 +0000 (00:04 +0000)
commit8d506b544fe570933df7e0e31650a7eb5b83ab85
tree426cf17f951ad9883f0097ee47cf89e7a38086ba
parent3b28c0d2727e98425fe45a5add4527cc72a39432
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: a0132a79df9b59d5d9b674665daf6cdbd79128a8

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/+/49551
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/llite/crypto.c
lustre/tests/sanity-sec.sh