aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/ecryptfs/main.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/fs/ecryptfs/main.c b/fs/ecryptfs/main.c
index df217dc9f1d9..923f6aa09cb3 100644
--- a/fs/ecryptfs/main.c
+++ b/fs/ecryptfs/main.c
@@ -279,6 +279,7 @@ static int ecryptfs_parse_options(struct ecryptfs_sb_info *sbi, char *options,
279 char *fnek_src; 279 char *fnek_src;
280 char *cipher_key_bytes_src; 280 char *cipher_key_bytes_src;
281 char *fn_cipher_key_bytes_src; 281 char *fn_cipher_key_bytes_src;
282 u8 cipher_code;
282 283
283 *check_ruid = 0; 284 *check_ruid = 0;
284 285
@@ -420,6 +421,18 @@ static int ecryptfs_parse_options(struct ecryptfs_sb_info *sbi, char *options,
420 && !fn_cipher_key_bytes_set) 421 && !fn_cipher_key_bytes_set)
421 mount_crypt_stat->global_default_fn_cipher_key_bytes = 422 mount_crypt_stat->global_default_fn_cipher_key_bytes =
422 mount_crypt_stat->global_default_cipher_key_size; 423 mount_crypt_stat->global_default_cipher_key_size;
424
425 cipher_code = ecryptfs_code_for_cipher_string(
426 mount_crypt_stat->global_default_cipher_name,
427 mount_crypt_stat->global_default_cipher_key_size);
428 if (!cipher_code) {
429 ecryptfs_printk(KERN_ERR,
430 "eCryptfs doesn't support cipher: %s",
431 mount_crypt_stat->global_default_cipher_name);
432 rc = -EINVAL;
433 goto out;
434 }
435
423 mutex_lock(&key_tfm_list_mutex); 436 mutex_lock(&key_tfm_list_mutex);
424 if (!ecryptfs_tfm_exists(mount_crypt_stat->global_default_cipher_name, 437 if (!ecryptfs_tfm_exists(mount_crypt_stat->global_default_cipher_name,
425 NULL)) { 438 NULL)) {