Whamcloud - gitweb
LU-15858 sec: reinstate null encryption for file names
authorSebastien Buisson <sbuisson@ddn.com>
Mon, 2 May 2022 16:00:37 +0000 (18:00 +0200)
committerOleg Drokin <green@whamcloud.com>
Fri, 27 May 2022 20:40:00 +0000 (16:40 -0400)
commit6d802909ea44d24208d5372a90a8edaaf35ab515
treecce519fac48b52adee86c7f709360793b10fa60b
parent6769363aa566c6b52e7aa827b0d70fb2e6d5160c
LU-15858 sec: reinstate null encryption for file names

Reinstate null encryption for file names by adding a new llite
parameter named 'enable_filename_encryption', set to 0 by default.
When this parameter is 0, new empty directories configured as
encrypted ignore the filenames_encryption_mode and use
LLCRYPT_MODE_NULL instead, which is a no-op. This LLCRYPT_MODE_NULL
mode is inherited for all subdirectories and files.
When this parameter is 1, new empty directories configured as
encrypted use the normal encryption mode.

To set this parameter globally for all clients, do on the MGS:
mgs# lctl set_param -P llite.*.enable_filename_encryption=0

Also update sanity-sec test_54 to exercise the new parameter
'enable_filename_encryption'.

Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I9d726ba26cc91a51690d59a81efe3eb98ee2995c
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/47355
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 files changed:
libcfs/include/libcfs/crypto/llcrypt.h
libcfs/include/libcfs/libcfs_debug.h
libcfs/libcfs/crypto/fname.c
libcfs/libcfs/crypto/hooks.c
libcfs/libcfs/crypto/policy.c
lustre/include/lustre_disk.h
lustre/llite/crypto.c
lustre/llite/file.c
lustre/llite/llite_lib.c
lustre/llite/lproc_llite.c
lustre/llite/super25.c
lustre/tests/sanity-sec.sh