ecryptfs: show filename encryption options
PATCH 1/1 ecryptfs: show filename encryption options
ecryptfs_show_options() prints most user-visible mount options but omits the filename encryption cipher and key size.
Print ecryptfs_fn_cipher and ecryptfs_fn_key_bytes when filename encryption is enabled so that the displayed mount options reflect the active filename encryption settings.
--- fs/ecryptfs/super.c | 7 +++++++ 1 file changed, 7 insertions(+)
fs/ecryptfs/super.c +7 -0
@@ -150,6 +150,13 @@ static int ecryptfs_show_options(struct seq_file *m, struct dentry *root)if (mount_crypt_stat->global_default_cipher_key_size)seq_printf (m,",ecryptfs_key_bytes=%zd" , mount_crypt_stat->global_default_cipher_key_size); +if (mount_crypt_stat->flags &ECRYPTFS_GLOBAL_ENCRYPT_FILENAMES ) { +seq_printf (m,",ecryptfs_fn_cipher=%s" , + mount_crypt_stat->global_default_fn_cipher_name); +if (mount_crypt_stat->global_default_fn_cipher_key_bytes) +seq_printf (m,",ecryptfs_fn_key_bytes=%zd" , + mount_crypt_stat->global_default_fn_cipher_key_bytes); + }if (mount_crypt_stat->flags &ECRYPTFS_PLAINTEXT_PASSTHROUGH_ENABLED )seq_printf (m,",ecryptfs_passthrough" );if (mount_crypt_stat->flags &ECRYPTFS_XATTR_METADATA_ENABLED )
Signature · 1 line
2.51.0
Tyler Hicks
maintainerQuoted 8 lines · Yichong Chen
ecryptfs_show_options()prints most user-visible mount options but omits the filename encryption cipher and key size.ecryptfs_fn_cipherandecryptfs_fn_key_byteswhen filename encryption is enabled so that the displayed mount options reflect the active filename encryption settings.[...]
Thank you! This has been applied to the next branch of the tyhicks/ecryptfs.git tree.
You can find a direct link below but please be aware that the commit hash is unstable and, therefore, the URL may not be valid in the future.
[1/1] ecryptfs: show filename encryption options
https://git.kernel.org/tyhicks/ecryptfs/c/496ec2d0852a02d2e631771b5c439130b9c7dce7
Tyler