Skip to content

Commit

Permalink
ecryptfs: checking return code of ecryptfs_find_auth_tok_for_sig()
Browse files Browse the repository at this point in the history
This patch replaces the check of the 'matching_auth_tok' pointer with
the exit status of ecryptfs_find_auth_tok_for_sig().
This avoids to use authentication tokens obtained through the function
ecryptfs_keyring_auth_tok_for_sig which are not valid.

Signed-off-by: Roberto Sassu <roberto.sassu@polito.it>
Cc: Dustin Kirkland <kirkland@canonical.com>
Cc: James Morris <jmorris@namei.org>
Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
  • Loading branch information
Roberto Sassu authored and Tyler Hicks committed Oct 29, 2010
1 parent aee683b commit 39fac85
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/ecryptfs/keystore.c
Original file line number Diff line number Diff line change
Expand Up @@ -1819,11 +1819,11 @@ int ecryptfs_parse_packet_set(struct ecryptfs_crypt_stat *crypt_stat,
rc = -EINVAL;
goto out_wipe_list;
}
ecryptfs_find_auth_tok_for_sig(&auth_tok_key,
rc = ecryptfs_find_auth_tok_for_sig(&auth_tok_key,
&matching_auth_tok,
crypt_stat->mount_crypt_stat,
candidate_auth_tok_sig);
if (matching_auth_tok) {
if (!rc) {
found_auth_tok = 1;
goto found_matching_auth_tok;
}
Expand Down

0 comments on commit 39fac85

Please sign in to comment.