Whamcloud - gitweb
LU-15858 sec: reinstate null encryption for file names 55/47355/4
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:39:14 +0000 (20:39 +0000)
commite68d496ada38acfe3d3ac73aa164440a00639596
treedbd534a479ef8b45607e1a66ed65423ad1fc7b92
parentfa7c81e81442c8d1ed0ce1c457769f2e144ff2c3
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