Messages in this thread | | | Date | Tue, 26 Aug 2008 18:46:58 +1000 (EST) | From | James Morris <> | Subject | Re: [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>
| |