diff options
author | Gilad Broner <gbroner@codeaurora.org> | 2016-01-11 14:07:26 +0200 |
---|---|---|
committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-25 16:04:06 -0700 |
commit | f50a4a1dc7a0196eb94bfaa18abb95dd387fee1e (patch) | |
tree | 46e88594582b5b69030c0eb224eca30a53f81da5 /fs/ecryptfs/main.c | |
parent | 53db8d989d8f077a5c8b2e41370449004b1c9199 (diff) |
eCryptfs: fixed bug in cipher handling
Cipher was sometimes not treated properly, causing valid
requests belonging to eCryptfs to be treated as regular.
Change-Id: Iabfb93cc4c9e9e167901043482eb99613ed70343
Signed-off-by: Andrey Markovytch <andreym@codeaurora.org>
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
Diffstat (limited to 'fs/ecryptfs/main.c')
-rw-r--r-- | fs/ecryptfs/main.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/fs/ecryptfs/main.c b/fs/ecryptfs/main.c index 63298ba20478..489d213270f8 100644 --- a/fs/ecryptfs/main.c +++ b/fs/ecryptfs/main.c @@ -292,7 +292,6 @@ static int ecryptfs_parse_options(struct ecryptfs_sb_info *sbi, char *options, int cipher_key_bytes_set = 0; int fn_cipher_key_bytes; int fn_cipher_key_bytes_set = 0; - size_t salt_size = 0; struct ecryptfs_mount_crypt_stat *mount_crypt_stat = &sbi->mount_crypt_stat; substring_t args[MAX_OPT_ARGS]; @@ -447,22 +446,7 @@ static int ecryptfs_parse_options(struct ecryptfs_sb_info *sbi, char *options, strcpy(mount_crypt_stat->global_default_fn_cipher_name, mount_crypt_stat->global_default_cipher_name); - if (cipher_key_bytes_set) { - - salt_size = ecryptfs_get_salt_size_for_cipher( - ecryptfs_get_full_cipher( - mount_crypt_stat->global_default_cipher_name, - mount_crypt_stat->global_default_cipher_mode, - final, sizeof(final))); - - if (!ecryptfs_check_space_for_salt( - mount_crypt_stat->global_default_cipher_key_size, - salt_size)) { - ecryptfs_printk( - KERN_WARNING, - "eCryptfs internal error: no space for salt"); - } - } else + if (!cipher_key_bytes_set) mount_crypt_stat->global_default_cipher_key_size = 0; if ((mount_crypt_stat->flags & ECRYPTFS_GLOBAL_ENCRYPT_FILENAMES) |