Skip to content

Commit

Permalink
eCryptfs: Print FNEK sig properly in /proc/mounts
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tyler Hicks committed Apr 22, 2009
1 parent 57ea34d commit 3a5203a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion fs/ecryptfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,10 @@ static int ecryptfs_show_options(struct seq_file *m, struct vfsmount *mnt)
list_for_each_entry(walker,
&mount_crypt_stat->global_auth_tok_list,
mount_crypt_stat_list) {
seq_printf(m, ",ecryptfs_sig=%s", walker->sig);
if (walker->flags & ECRYPTFS_AUTH_TOK_FNEK)
seq_printf(m, ",ecryptfs_fnek_sig=%s", walker->sig);
else
seq_printf(m, ",ecryptfs_sig=%s", walker->sig);
}
mutex_unlock(&mount_crypt_stat->global_auth_tok_list_mutex);

Expand Down

0 comments on commit 3a5203a

Please sign in to comment.