summaryrefslogtreecommitdiff
path: root/fs/ecryptfs
diff options
context:
space:
mode:
authorYichong Chen <chenyichong@uniontech.com>2026-07-02 13:29:58 +0800
committerTyler Hicks <code@tyhicks.com>2026-07-20 22:12:46 -0500
commit496ec2d0852a02d2e631771b5c439130b9c7dce7 (patch)
treee9c4088e65479b2662551bf18f569a5becc08b31 /fs/ecryptfs
parent95540462e630edbc8504e9537d16453d6942d143 (diff)
downloadlinux-next-496ec2d0852a02d2e631771b5c439130b9c7dce7.tar.gz
linux-next-496ec2d0852a02d2e631771b5c439130b9c7dce7.zip
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. Fixes: 87c94c4df014 ("eCryptfs: Filename Encryption: mount option") Cc: <stable@vger.kernel.org> Signed-off-by: Yichong Chen <chenyichong@uniontech.com> Signed-off-by: Tyler Hicks <code@tyhicks.com>
Diffstat (limited to 'fs/ecryptfs')
-rw-r--r--fs/ecryptfs/super.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/ecryptfs/super.c b/fs/ecryptfs/super.c
index 3bc21d677564..686b2b4a9cb5 100644
--- a/fs/ecryptfs/super.c
+++ b/fs/ecryptfs/super.c
@@ -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)