Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 105450
b: refs/heads/master
c: 8f23680
h: refs/heads/master
v: v3
  • Loading branch information
Miklos Szeredi authored and Linus Torvalds committed Jul 24, 2008
1 parent 0151162 commit 31be8bf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 982363c97f8cad7aea4c3d2cfebffc1cc2d2f166
refs/heads/master: 8f2368095e25018838e1bf145041f58270ccd32e
18 changes: 6 additions & 12 deletions trunk/fs/ecryptfs/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,6 @@ static int ecryptfs_parse_options(struct super_block *sb, char *options)
char *cipher_name_dst;
char *cipher_name_src;
char *cipher_key_bytes_src;
int cipher_name_len;

if (!options) {
rc = -EINVAL;
Expand Down Expand Up @@ -382,17 +381,12 @@ static int ecryptfs_parse_options(struct super_block *sb, char *options)
goto out;
}
if (!cipher_name_set) {
cipher_name_len = strlen(ECRYPTFS_DEFAULT_CIPHER);
if (unlikely(cipher_name_len
>= ECRYPTFS_MAX_CIPHER_NAME_SIZE)) {
rc = -EINVAL;
BUG();
goto out;
}
memcpy(mount_crypt_stat->global_default_cipher_name,
ECRYPTFS_DEFAULT_CIPHER, cipher_name_len);
mount_crypt_stat->global_default_cipher_name[cipher_name_len]
= '\0';
int cipher_name_len = strlen(ECRYPTFS_DEFAULT_CIPHER);

BUG_ON(cipher_name_len >= ECRYPTFS_MAX_CIPHER_NAME_SIZE);

strcpy(mount_crypt_stat->global_default_cipher_name,
ECRYPTFS_DEFAULT_CIPHER);
}
if (!cipher_key_bytes_set) {
mount_crypt_stat->global_default_cipher_key_size = 0;
Expand Down

0 comments on commit 31be8bf

Please sign in to comment.