diff options
author | Tyler Hicks <tyhicks@linux.vnet.ibm.com> | 2009-03-16 13:35:12 -0400 |
---|---|---|
committer | Tyler Hicks <tyhicks@linux.vnet.ibm.com> | 2009-04-22 04:54:13 -0400 |
commit | 3a5203ab3c0c31e0f1434c69e893bfb85c6e6657 (patch) | |
tree | 76edf493f4737f57448e5705cd7d29fddeb4a66a /fs/ecryptfs/super.c | |
parent | 57ea34d19963781d05eb12f9b31bd4f70d61ec16 (diff) |
eCryptfs: Print FNEK sig properly in /proc/mounts
The filename encryption key signature is not properly displayed in
/proc/mounts. The "ecryptfs_sig=" mount option name is displayed for
all global authentication tokens, included those for filename keys.
This patch checks the global authentication token flags to determine if
the key is a FEKEK or FNEK and prints the appropriate mount option name
before the signature.
Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
Diffstat (limited to 'fs/ecryptfs/super.c')
-rw-r--r-- | fs/ecryptfs/super.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/ecryptfs/super.c b/fs/ecryptfs/super.c index c27ac2b358a1..b5003023f106 100644 --- a/fs/ecryptfs/super.c +++ b/fs/ecryptfs/super.c | |||
@@ -170,7 +170,10 @@ static int ecryptfs_show_options(struct seq_file *m, struct vfsmount *mnt) | |||
170 | list_for_each_entry(walker, | 170 | list_for_each_entry(walker, |
171 | &mount_crypt_stat->global_auth_tok_list, | 171 | &mount_crypt_stat->global_auth_tok_list, |
172 | mount_crypt_stat_list) { | 172 | mount_crypt_stat_list) { |
173 | seq_printf(m, ",ecryptfs_sig=%s", walker->sig); | 173 | if (walker->flags & ECRYPTFS_AUTH_TOK_FNEK) |
174 | seq_printf(m, ",ecryptfs_fnek_sig=%s", walker->sig); | ||
175 | else | ||
176 | seq_printf(m, ",ecryptfs_sig=%s", walker->sig); | ||
174 | } | 177 | } |
175 | mutex_unlock(&mount_crypt_stat->global_auth_tok_list_mutex); | 178 | mutex_unlock(&mount_crypt_stat->global_auth_tok_list_mutex); |
176 | 179 | ||