]> err.no Git - linux-2.6/commit
keys: allow clients to set key perms in key_create_or_update()
authorArun Raghavan <arunsr@cse.iitk.ac.in>
Tue, 29 Apr 2008 08:01:28 +0000 (01:01 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 29 Apr 2008 15:06:16 +0000 (08:06 -0700)
commit6b79ccb5144f9ffb4d4596c23e7570238dd12abc
treee674339e9f86c3607304496792b417b0ed66de6f
parentda91d2ef9fe4fd84cc0a8a729201d38e40ac9f2e
keys: allow clients to set key perms in key_create_or_update()

The key_create_or_update() function provided by the keyring code has a default
set of permissions that are always applied to the key when created.  This
might not be desirable to all clients.

Here's a patch that adds a "perm" parameter to the function to address this,
which can be set to KEY_PERM_UNDEF to revert to the current behaviour.

Signed-off-by: Arun Raghavan <arunsr@cse.iitk.ac.in>
Signed-off-by: David Howells <dhowells@redhat.com>
Cc: Satyam Sharma <ssatyam@cse.iitk.ac.in>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/key.h
security/keys/key.c
security/keys/keyctl.c