All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: "Serge E. Hallyn" <serue@us.ibm.com>
Cc: lkml <linux-kernel@vger.kernel.org>,
	linux-security-module@vger.kernel.org,
	David Howells <dhowells@redhat.com>
Subject: Re: [PATCH] split security_key_alloc into two functions
Date: Tue, 28 Mar 2006 14:50:06 +0100	[thread overview]
Message-ID: <4452.1143553806@warthog.cambridge.redhat.com> (raw)
In-Reply-To: <20060328130533.GB19243@sergelap.austin.ibm.com>

Serge E. Hallyn <serue@us.ibm.com> wrote:

> The security_key_alloc() function acted as both an authorizer and
> security structure allocation function.  These roles should be
> separated.  There are two reasons for this.

Your patch is part of what I had originally, but this was mildly objected to
because SE Linux didn't care, so I dropped the post function for later
resurrection.  See the email thread rooted on:

	| From: David Howells <dhowells@redhat.com>
	| To: torvalds@osdl.org, akpm@osdl.org
	| Date: Wed, 05 Oct 2005 17:28:34 +0100
	| Cc: keyrings@linux-nfs.org, linux-kernel@vger.kernel.org
	| Subject: [Keyrings] [PATCH] Keys: Add LSM hooks for key management

in which I included key_post_alloc():

		/* publish the key by giving it a serial number */
		atomic_inc(&user->nkeys);
		key_alloc_serial(key);

	- error:
	+	/* let the security module know the key has been published */
	+	security_key_post_alloc(key);
	+
	+error:

I'm happy with this patch, though I'd like the comment you can see in the
above snippet to be added back into key.c too.

Note also that by the time the post function is called, it's a little late to
be authorising creation of the key since the key has been published by that
point.

Acked-By: David Howells <dhowells@redhat.com>

  parent reply	other threads:[~2006-03-28 13:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-28 13:05 [PATCH] split security_key_alloc into two functions Serge E. Hallyn
2006-03-28 13:43 ` Stephen Smalley
2006-03-28 13:53   ` Serge E. Hallyn
2006-03-28 14:18     ` Stephen Smalley
2006-03-28 13:50 ` David Howells [this message]
2006-03-28 14:07   ` Serge E. Hallyn

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=4452.1143553806@warthog.cambridge.redhat.com \
    --to=dhowells@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=serue@us.ibm.com \
    /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.