aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ecryptfs/keystore.c
diff options
context:
space:
mode:
authorRoberto Sassu <roberto.sassu@polito.it>2011-03-21 11:00:52 -0400
committerTyler Hicks <tyhicks@linux.vnet.ibm.com>2011-03-28 02:49:40 -0400
commit7762e230fd31fcc1abc03ba32ee957fadc8eafb4 (patch)
treed49635aa3406a0e3590e1a0886c4aba9e5ed0145 /fs/ecryptfs/keystore.c
parentcf35ca69131d5fc8febb74629d173e0731bf49c0 (diff)
eCryptfs: modified size of keysig in the ecryptfs_key_sig structure
The size of the 'keysig' array is incremented of one byte in order to make room for the NULL character. The 'keysig' variable is used, in the function ecryptfs_generate_key_packet_set(), to find an authentication token with the given signature and is printed a debug message if it cannot be retrieved. Signed-off-by: Roberto Sassu <roberto.sassu@polito.it> Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
Diffstat (limited to 'fs/ecryptfs/keystore.c')
-rw-r--r--fs/ecryptfs/keystore.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ecryptfs/keystore.c b/fs/ecryptfs/keystore.c
index 523e51dec66e..bd139dfad8e7 100644
--- a/fs/ecryptfs/keystore.c
+++ b/fs/ecryptfs/keystore.c
@@ -2425,6 +2425,7 @@ int ecryptfs_add_keysig(struct ecryptfs_crypt_stat *crypt_stat, char *sig)
2425 return -ENOMEM; 2425 return -ENOMEM;
2426 } 2426 }
2427 memcpy(new_key_sig->keysig, sig, ECRYPTFS_SIG_SIZE_HEX); 2427 memcpy(new_key_sig->keysig, sig, ECRYPTFS_SIG_SIZE_HEX);
2428 new_key_sig->keysig[ECRYPTFS_SIG_SIZE_HEX] = '\0';
2428 /* Caller must hold keysig_list_mutex */ 2429 /* Caller must hold keysig_list_mutex */
2429 list_add(&new_key_sig->crypt_stat_list, &crypt_stat->keysig_list); 2430 list_add(&new_key_sig->crypt_stat_list, &crypt_stat->keysig_list);
2430 2431