Re: [PATCH] split security_key_alloc into two functions
- From: David Howells <dhowells@xxxxxxxxxx>
- Date: Tue, 28 Mar 2006 14:50:06 +0100
Serge E. Hallyn <serue@xxxxxxxxxx> 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@xxxxxxxxxx>
| To: torvalds@xxxxxxxx, akpm@xxxxxxxx
| Date: Wed, 05 Oct 2005 17:28:34 +0100
| Cc: keyrings@xxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
| 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@xxxxxxxxxx>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- Re: [PATCH] split security_key_alloc into two functions
- From: Serge E. Hallyn
- Re: [PATCH] split security_key_alloc into two functions
- References:
- [PATCH] split security_key_alloc into two functions
- From: Serge E. Hallyn
- [PATCH] split security_key_alloc into two functions
- Prev by Date: Re: eCryptfs Design Document
- Next by Date: Re: [PATCH] split security_key_alloc into two functions
- Previous by thread: Re: [PATCH] split security_key_alloc into two functions
- Next by thread: Re: [PATCH] split security_key_alloc into two functions
- Index(es):
Relevant Pages
- Another experimental patch: quickhell
... An ALPHA-level patch without documentation or standards adherence. ... for reasons
that will become clear. ... Qrzbtbetna vf abj n thnenagrrq zbafgre, ... (rec.games.roguelike.nethack) - Re: quitting
... pain coming back. ... your own personal reasons but you don't know how
to stop because of the ... What about a Patch created to help ... Also, for me personally,
I don't feel Morphine ... (alt.support.chronic-pain) - Re: Coding style: mixed-case
... >>While there may be reasons why mixed case is suboptimal, ... > Certainly
I would like to have a go at a patch, but I must say that I do not ... There could be a
quite a bit of external code using these interfaces. ... send the line "unsubscribe
linux-kernel" in ... (Linux-Kernel) - Re: DOM and SAX parsing in Ada
... > reasons. ... The issue is, after a patch is integrated, how long
is it before it is ... it is necessary for _everyone_ to have read access to a CVS ...
repository, if you want to encourage comtributions to that repository. ... (comp.lang.ada) - Re: Shouldnt kconfig defaults match recommendations in help text?
... but thank you for the detailed explanation. ... >> be interrested in the
reasons why not. ... changing one kconfig default pr patch. ... To unsubscribe
from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
... (Linux-Kernel)