lkml.org 
[lkml]   [2008]   [Aug]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] CRED: Document the credential API's (ab)use of const pointers
On Thu, 21 Aug 2008, David Howells wrote:

> Document the credential API's (ab)use of const pointers. Various pointers to
> credentials, such as those in the task_struct, are declared const. The purpose
> of this is to compile-time discouragement of altering credentials through those
> pointers. Once a set of credentials has been made public through one of these
> pointers, it may not be modified, except under special circumstances:
>
> (1) Its reference count may incremented and decremented.
>
> (2) The keyrings to which it points may be modified, but not replaced.
>
> The only safe way to modify anything else is to create a replacement and commit
> using the functions described in Documentation/credentials.txt.
>
> Signed-off-by: David Howells <dhowells@redhat.com>

Applied to
git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6#next-creds


--
James Morris
<jmorris@namei.org>


\
 
 \ /
  Last update: 2008-08-26 10:51    [W:0.170 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site