main.c (982363c97f8cad7aea4c3d2cfebffc1cc2d2f166) | main.c (8f2368095e25018838e1bf145041f58270ccd32e) |
---|---|
1/** 2 * eCryptfs: Linux filesystem encryption layer 3 * 4 * Copyright (C) 1997-2003 Erez Zadok 5 * Copyright (C) 2001-2003 Stony Brook University 6 * Copyright (C) 2004-2007 International Business Machines Corp. 7 * Author(s): Michael A. Halcrow <mahalcro@us.ibm.com> 8 * Michael C. Thompson <mcthomps@us.ibm.com> --- 287 unchanged lines hidden (view full) --- 296 struct ecryptfs_mount_crypt_stat *mount_crypt_stat = 297 &ecryptfs_superblock_to_private(sb)->mount_crypt_stat; 298 substring_t args[MAX_OPT_ARGS]; 299 int token; 300 char *sig_src; 301 char *cipher_name_dst; 302 char *cipher_name_src; 303 char *cipher_key_bytes_src; | 1/** 2 * eCryptfs: Linux filesystem encryption layer 3 * 4 * Copyright (C) 1997-2003 Erez Zadok 5 * Copyright (C) 2001-2003 Stony Brook University 6 * Copyright (C) 2004-2007 International Business Machines Corp. 7 * Author(s): Michael A. Halcrow <mahalcro@us.ibm.com> 8 * Michael C. Thompson <mcthomps@us.ibm.com> --- 287 unchanged lines hidden (view full) --- 296 struct ecryptfs_mount_crypt_stat *mount_crypt_stat = 297 &ecryptfs_superblock_to_private(sb)->mount_crypt_stat; 298 substring_t args[MAX_OPT_ARGS]; 299 int token; 300 char *sig_src; 301 char *cipher_name_dst; 302 char *cipher_name_src; 303 char *cipher_key_bytes_src; |
304 int cipher_name_len; | |
305 306 if (!options) { 307 rc = -EINVAL; 308 goto out; 309 } 310 ecryptfs_init_mount_crypt_stat(mount_crypt_stat); 311 while ((p = strsep(&options, ",")) != NULL) { 312 if (!*p) --- 64 unchanged lines hidden (view full) --- 377 if (!sig_set) { 378 rc = -EINVAL; 379 ecryptfs_printk(KERN_ERR, "You must supply at least one valid " 380 "auth tok signature as a mount " 381 "parameter; see the eCryptfs README\n"); 382 goto out; 383 } 384 if (!cipher_name_set) { | 304 305 if (!options) { 306 rc = -EINVAL; 307 goto out; 308 } 309 ecryptfs_init_mount_crypt_stat(mount_crypt_stat); 310 while ((p = strsep(&options, ",")) != NULL) { 311 if (!*p) --- 64 unchanged lines hidden (view full) --- 376 if (!sig_set) { 377 rc = -EINVAL; 378 ecryptfs_printk(KERN_ERR, "You must supply at least one valid " 379 "auth tok signature as a mount " 380 "parameter; see the eCryptfs README\n"); 381 goto out; 382 } 383 if (!cipher_name_set) { |
385 cipher_name_len = strlen(ECRYPTFS_DEFAULT_CIPHER); 386 if (unlikely(cipher_name_len 387 >= ECRYPTFS_MAX_CIPHER_NAME_SIZE)) { 388 rc = -EINVAL; 389 BUG(); 390 goto out; 391 } 392 memcpy(mount_crypt_stat->global_default_cipher_name, 393 ECRYPTFS_DEFAULT_CIPHER, cipher_name_len); 394 mount_crypt_stat->global_default_cipher_name[cipher_name_len] 395 = '\0'; | 384 int cipher_name_len = strlen(ECRYPTFS_DEFAULT_CIPHER); 385 386 BUG_ON(cipher_name_len >= ECRYPTFS_MAX_CIPHER_NAME_SIZE); 387 388 strcpy(mount_crypt_stat->global_default_cipher_name, 389 ECRYPTFS_DEFAULT_CIPHER); |
396 } 397 if (!cipher_key_bytes_set) { 398 mount_crypt_stat->global_default_cipher_key_size = 0; 399 } 400 mutex_lock(&key_tfm_list_mutex); 401 if (!ecryptfs_tfm_exists(mount_crypt_stat->global_default_cipher_name, 402 NULL)) 403 rc = ecryptfs_add_new_key_tfm( --- 444 unchanged lines hidden --- | 390 } 391 if (!cipher_key_bytes_set) { 392 mount_crypt_stat->global_default_cipher_key_size = 0; 393 } 394 mutex_lock(&key_tfm_list_mutex); 395 if (!ecryptfs_tfm_exists(mount_crypt_stat->global_default_cipher_name, 396 NULL)) 397 rc = ecryptfs_add_new_key_tfm( --- 444 unchanged lines hidden --- |