LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: David Howells <dhowells@redhat.com>
Cc: torvalds@linux-foundation.org, linux-kernel@vger.kernel.org,
	dhowells@redhat.com
Subject: Re: [PATCH 4/4] KEYS: Add keyctl function to get a security label
Date: Tue, 12 Feb 2008 15:51:37 -0800	[thread overview]
Message-ID: <20080212155137.d07f80b7.akpm@linux-foundation.org> (raw)
In-Reply-To: <20080208160440.14436.60408.stgit@warthog.procyon.org.uk>

On Fri, 08 Feb 2008 16:04:40 +0000
David Howells <dhowells@redhat.com> wrote:

> +	key_ref = lookup_user_key(NULL, keyid, 0, 1, KEY_VIEW);
> +	if (IS_ERR(key_ref)) {
> +		if (PTR_ERR(key_ref) != -EACCES)
> +			return PTR_ERR(key_ref);
> +
> +		/* viewing a key under construction is also permitted if we
> +		 * have the authorisation token handy */
> +		instkey = key_get_instantiation_authkey(keyid);
> +		if (IS_ERR(instkey))
> +			return PTR_ERR(key_ref);
> +		key_put(instkey);

This check looks a wee bit racy?

  reply	other threads:[~2008-02-12 23:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-08 16:04 [PATCH 1/4] KEYS: Increase the payload size when instantiating a key David Howells
2008-02-08 16:04 ` [PATCH 2/4] KEYS: Check starting keyring as part of search David Howells
2008-02-12 23:47   ` Andrew Morton
2008-02-13 12:35   ` David Howells
2008-02-08 16:04 ` [PATCH 3/4] KEYS: Allow the callout data to be passed as a blob rather than a string David Howells
2008-02-08 16:04 ` [PATCH 4/4] KEYS: Add keyctl function to get a security label David Howells
2008-02-12 23:51   ` Andrew Morton [this message]
2008-02-13 12:38   ` David Howells

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=20080212155137.d07f80b7.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=dhowells@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --subject='Re: [PATCH 4/4] KEYS: Add keyctl function to get a security label' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).