All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
To: Roberto Sassu <roberto.sassu@polito.it>
Cc: kirkland@canonical.com, jmorris@namei.org,
	akpm@linux-foundation.org, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-security-module@vger.kernel.org
Subject: Re: [PATCH 2/3] ecryptfs: checking return code of ecryptfs_find_auth_tok_for_sig()
Date: Fri, 8 Oct 2010 14:10:45 -0500	[thread overview]
Message-ID: <20101008191045.GC15669@boomer> (raw)
In-Reply-To: <201010061831.15661.roberto.sassu@polito.it>

On Wed Oct 06, 2010 at 06:31:15PM +0200, Roberto Sassu <roberto.sassu@polito.it> wrote:
> 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>
> ---

Nice catch - applied to
git://git.kernel.org/pub/scm/linux/kernel/git/ecryptfs/ecryptfs-2.6.git#next

Thanks!

>  fs/ecryptfs/keystore.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/ecryptfs/keystore.c b/fs/ecryptfs/keystore.c
> index 77580db..643d011 100644
> --- a/fs/ecryptfs/keystore.c
> +++ b/fs/ecryptfs/keystore.c
> @@ -1819,11 +1819,11 @@ find_next_matching_auth_tok:
>  			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;
>  		}
> -- 
> 1.7.2.3



      reply	other threads:[~2010-10-08 19:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-06 16:31 [PATCH 2/3] ecryptfs: checking return code of ecryptfs_find_auth_tok_for_sig() Roberto Sassu
2010-10-06 16:31 ` Roberto Sassu
2010-10-08 19:10 ` Tyler Hicks [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101008191045.GC15669@boomer \
    --to=tyhicks@linux.vnet.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=jmorris@namei.org \
    --cc=kirkland@canonical.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=roberto.sassu@polito.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.