Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 166172
b: refs/heads/master
c: df6ad33
h: refs/heads/master
v: v3
  • Loading branch information
Tyler Hicks committed Sep 23, 2009
1 parent f015841 commit de58098
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 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: ac22ba23b659e34a5961aec8c945608e471b0d5b
refs/heads/master: df6ad33ba1b9846bd5f0e2b9016c30c20bc2d948
4 changes: 2 additions & 2 deletions trunk/fs/ecryptfs/crypto.c
Original file line number Diff line number Diff line change
Expand Up @@ -1703,7 +1703,7 @@ ecryptfs_encrypt_filename(struct ecryptfs_filename *filename,
} else {
printk(KERN_ERR "%s: No support for requested filename "
"encryption method in this release\n", __func__);
rc = -ENOTSUPP;
rc = -EOPNOTSUPP;
goto out;
}
out:
Expand Down Expand Up @@ -2168,7 +2168,7 @@ int ecryptfs_encrypt_and_encode_filename(
(*encoded_name)[(*encoded_name_size)] = '\0';
(*encoded_name_size)++;
} else {
rc = -ENOTSUPP;
rc = -EOPNOTSUPP;
}
if (rc) {
printk(KERN_ERR "%s: Error attempting to encode "
Expand Down
14 changes: 12 additions & 2 deletions trunk/fs/ecryptfs/keystore.c
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,12 @@ ecryptfs_write_tag_70_packet(char *dest, size_t *remaining_bytes,
}
/* TODO: Support other key modules than passphrase for
* filename encryption */
BUG_ON(s->auth_tok->token_type != ECRYPTFS_PASSWORD);
if (s->auth_tok->token_type != ECRYPTFS_PASSWORD) {
rc = -EOPNOTSUPP;
printk(KERN_INFO "%s: Filename encryption only supports "
"password tokens\n", __func__);
goto out_free_unlock;
}
sg_init_one(
&s->hash_sg,
(u8 *)s->auth_tok->token.password.session_key_encryption_key,
Expand Down Expand Up @@ -910,7 +915,12 @@ ecryptfs_parse_tag_70_packet(char **filename, size_t *filename_size,
}
/* TODO: Support other key modules than passphrase for
* filename encryption */
BUG_ON(s->auth_tok->token_type != ECRYPTFS_PASSWORD);
if (s->auth_tok->token_type != ECRYPTFS_PASSWORD) {
rc = -EOPNOTSUPP;
printk(KERN_INFO "%s: Filename encryption only supports "
"password tokens\n", __func__);
goto out_free_unlock;
}
rc = crypto_blkcipher_setkey(
s->desc.tfm,
s->auth_tok->token.password.session_key_encryption_key,
Expand Down

0 comments on commit de58098

Please sign in to comment.