diff options
| author | David Howells <dhowells@redhat.com> | 2011-03-07 10:05:59 -0500 |
|---|---|---|
| committer | James Morris <jmorris@namei.org> | 2011-03-07 19:17:15 -0500 |
| commit | b9fffa3877a3ebbe0a5ad5a247358e2f7df15b24 (patch) | |
| tree | 0f58a92c2616b3663f88935290d32a4c90d57025 /include/linux | |
| parent | 633e804e89464d3875e59de1959a53f9041d3094 (diff) | |
KEYS: Add a key type op to permit the key description to be vetted
Add a key type operation to permit the key type to vet the description of a new
key that key_alloc() is about to allocate. The operation may reject the
description if it wishes with an error of its choosing. If it does this, the
key will not be allocated.
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Mimi Zohar <zohar@us.ibm.com>
Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/key-type.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/key-type.h b/include/linux/key-type.h index 65833d4d5998..fc8525e838b7 100644 --- a/include/linux/key-type.h +++ b/include/linux/key-type.h | |||
| @@ -41,6 +41,9 @@ struct key_type { | |||
| 41 | */ | 41 | */ |
| 42 | size_t def_datalen; | 42 | size_t def_datalen; |
| 43 | 43 | ||
| 44 | /* vet a description */ | ||
| 45 | int (*vet_description)(const char *description); | ||
| 46 | |||
| 44 | /* instantiate a key of this type | 47 | /* instantiate a key of this type |
| 45 | * - this method should call key_payload_reserve() to determine if the | 48 | * - this method should call key_payload_reserve() to determine if the |
| 46 | * user's quota will hold the payload | 49 | * user's quota will hold the payload |
