mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
KEYS: Flag dead keys to induce EKEYREVOKED [try #6]
Set the KEY_FLAG_DEAD flag on keys for which the type has been removed. This causes the key_permission() function to return EKEYREVOKED in response to various commands. It does not, however, prevent unlinking or clearing of keyrings from detaching the key. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Serge Hallyn <serue@us.ibm.com> Signed-off-by: James Morris <jmorris@namei.org>
This commit is contained in:
parent
0c2c9a3fc7
commit
f041ae2f99
1 changed files with 3 additions and 1 deletions
|
@ -956,8 +956,10 @@ void unregister_key_type(struct key_type *ktype)
|
|||
for (_n = rb_first(&key_serial_tree); _n; _n = rb_next(_n)) {
|
||||
key = rb_entry(_n, struct key, serial_node);
|
||||
|
||||
if (key->type == ktype)
|
||||
if (key->type == ktype) {
|
||||
key->type = &key_type_dead;
|
||||
set_bit(KEY_FLAG_DEAD, &key->flags);
|
||||
}
|
||||
}
|
||||
|
||||
spin_unlock(&key_serial_lock);
|
||||
|
|
Loading…
Reference in a new issue