diff options
Diffstat (limited to 'fs/ecryptfs/crypto.c')
-rw-r--r-- | fs/ecryptfs/crypto.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/ecryptfs/crypto.c b/fs/ecryptfs/crypto.c index c01e043670e2..bdca1f4b3a3e 100644 --- a/fs/ecryptfs/crypto.c +++ b/fs/ecryptfs/crypto.c | |||
@@ -946,6 +946,8 @@ static int ecryptfs_copy_mount_wide_sigs_to_inode_sigs( | |||
946 | list_for_each_entry(global_auth_tok, | 946 | list_for_each_entry(global_auth_tok, |
947 | &mount_crypt_stat->global_auth_tok_list, | 947 | &mount_crypt_stat->global_auth_tok_list, |
948 | mount_crypt_stat_list) { | 948 | mount_crypt_stat_list) { |
949 | if (global_auth_tok->flags & ECRYPTFS_AUTH_TOK_FNEK) | ||
950 | continue; | ||
949 | rc = ecryptfs_add_keysig(crypt_stat, global_auth_tok->sig); | 951 | rc = ecryptfs_add_keysig(crypt_stat, global_auth_tok->sig); |
950 | if (rc) { | 952 | if (rc) { |
951 | printk(KERN_ERR "Error adding keysig; rc = [%d]\n", rc); | 953 | printk(KERN_ERR "Error adding keysig; rc = [%d]\n", rc); |
@@ -1716,7 +1718,7 @@ static int ecryptfs_copy_filename(char **copied_name, size_t *copied_name_size, | |||
1716 | { | 1718 | { |
1717 | int rc = 0; | 1719 | int rc = 0; |
1718 | 1720 | ||
1719 | (*copied_name) = kmalloc((name_size + 2), GFP_KERNEL); | 1721 | (*copied_name) = kmalloc((name_size + 1), GFP_KERNEL); |
1720 | if (!(*copied_name)) { | 1722 | if (!(*copied_name)) { |
1721 | rc = -ENOMEM; | 1723 | rc = -ENOMEM; |
1722 | goto out; | 1724 | goto out; |
@@ -1726,7 +1728,7 @@ static int ecryptfs_copy_filename(char **copied_name, size_t *copied_name_size, | |||
1726 | * in printing out the | 1728 | * in printing out the |
1727 | * string in debug | 1729 | * string in debug |
1728 | * messages */ | 1730 | * messages */ |
1729 | (*copied_name_size) = (name_size + 1); | 1731 | (*copied_name_size) = name_size; |
1730 | out: | 1732 | out: |
1731 | return rc; | 1733 | return rc; |
1732 | } | 1734 | } |