Re: [PATCH] CRED: Document the credential API's (ab)use of constpointers

From: James Morris
Date: Tue Aug 26 2008 - 04:47:38 EST


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@xxxxxxxxxx>

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


--
James Morris
<jmorris@xxxxxxxxx>
--
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/