KEYS: Add garbage collection for dead, revoked and expired keys. [try #6]
authorDavid Howells <dhowells@redhat.com>
Wed, 2 Sep 2009 08:14:00 +0000 (09:14 +0100)
committerJames Morris <jmorris@namei.org>
Wed, 2 Sep 2009 11:29:11 +0000 (21:29 +1000)
commit5d135440faf7db8d566de0c6fab36b16cf9cfc3b
treed9c022e73ed51dfe5729fde9a97150cb64b68196
parentf041ae2f99d49adc914153a34a2d0e14e4389d90
KEYS: Add garbage collection for dead, revoked and expired keys. [try #6]

Add garbage collection for dead, revoked and expired keys.  This involved
erasing all links to such keys from keyrings that point to them.  At that
point, the key will be deleted in the normal manner.

Keyrings from which garbage collection occurs are shrunk and their quota
consumption reduced as appropriate.

Dead keys (for which the key type has been removed) will be garbage collected
immediately.

Revoked and expired keys will hang around for a number of seconds, as set in
/proc/sys/kernel/keys/gc_delay before being automatically removed.  The default
is 5 minutes.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: James Morris <jmorris@namei.org>
Documentation/keys.txt
include/linux/key.h
security/keys/Makefile
security/keys/gc.c [new file with mode: 0644]
security/keys/internal.h
security/keys/key.c
security/keys/keyctl.c
security/keys/keyring.c
security/keys/sysctl.c