OpenCloudOS-Kernel/security/keys
David Howells 1d9b7d97d6 [PATCH] Keys: Replace duplicate non-updateable keys rather than failing
Cause an attempt to add a duplicate non-updateable key (such as a keyring) to
a keyring to discard the extant copy in favour of the new one rather than
failing with EEXIST:

	# do the test in an empty session
	keyctl session
	# create a new keyring called "a" and attach to session
	keyctl newring a @s
	# create another new keyring called "a" and attach to session,
	# displacing the keyring added by the second command:
	keyctl newring a @s

Without this patch, the third command will fail.

For updateable keys (such as those of "user" type), the update method will
still be called rather than a new key being created.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-25 08:22:50 -08:00
..
Makefile [PATCH] Keys: Split key permissions checking into a .c file 2005-10-08 14:53:31 -07:00
compat.c [PATCH] keys: Permit running process to instantiate keys 2006-01-08 20:13:53 -08:00
internal.h [PATCH] keys: Permit running process to instantiate keys 2006-01-08 20:13:53 -08:00
key.c [PATCH] Keys: Replace duplicate non-updateable keys rather than failing 2006-03-25 08:22:50 -08:00
keyctl.c [PATCH] strndup_user: convert keyctl 2006-03-24 07:33:31 -08:00
keyring.c [PATCH] keys: Permit running process to instantiate keys 2006-01-08 20:13:53 -08:00
permission.c [PATCH] keys: Permit running process to instantiate keys 2006-01-08 20:13:53 -08:00
proc.c [PATCH] Keys: Add possessor permissions to keys [try #3] 2005-09-28 09:10:47 -07:00
process_keys.c [PATCH] sem2mutex: security/ 2006-03-22 07:54:06 -08:00
request_key.c [PATCH] keys: Permit running process to instantiate keys 2006-01-08 20:13:53 -08:00
request_key_auth.c [PATCH] keys: Permit running process to instantiate keys 2006-01-08 20:13:53 -08:00
user_defined.c [PATCH] Keys: Remove key duplication 2006-01-06 08:33:29 -08:00