Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 83515
b: refs/heads/master
c: 8e3a6f1
h: refs/heads/master
i:
  83513: 681b7a4
  83511: 5fea002
v: v3
  • Loading branch information
Trevor Highland authored and Linus Torvalds committed Feb 6, 2008
1 parent d53b5d8 commit a5fb570
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 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: cc11beffdf80ca31dff21422fa2a5e54d25f1494
refs/heads/master: 8e3a6f16ba5874b69968cd450334829262513fd1
7 changes: 5 additions & 2 deletions trunk/fs/ecryptfs/crypto.c
Original file line number Diff line number Diff line change
Expand Up @@ -355,8 +355,11 @@ static int encrypt_scatterlist(struct ecryptfs_crypt_stat *crypt_stat,
}
/* Consider doing this once, when the file is opened */
mutex_lock(&crypt_stat->cs_tfm_mutex);
rc = crypto_blkcipher_setkey(crypt_stat->tfm, crypt_stat->key,
crypt_stat->key_size);
if (!(crypt_stat->flags & ECRYPTFS_KEY_SET)) {
rc = crypto_blkcipher_setkey(crypt_stat->tfm, crypt_stat->key,
crypt_stat->key_size);
crypt_stat->flags |= ECRYPTFS_KEY_SET;
}
if (rc) {
ecryptfs_printk(KERN_ERR, "Error setting key; rc = [%d]\n",
rc);
Expand Down
1 change: 1 addition & 0 deletions trunk/fs/ecryptfs/ecryptfs_kernel.h
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ struct ecryptfs_crypt_stat {
#define ECRYPTFS_KEY_VALID 0x00000080
#define ECRYPTFS_METADATA_IN_XATTR 0x00000100
#define ECRYPTFS_VIEW_AS_ENCRYPTED 0x00000200
#define ECRYPTFS_KEY_SET 0x00000400
u32 flags;
unsigned int file_version;
size_t iv_bytes;
Expand Down

0 comments on commit a5fb570

Please sign in to comment.