diff options
author | Mat Martineau <mathew.j.martineau@linux.intel.com> | 2016-06-27 16:10:59 -0700 |
---|---|---|
committer | Mat Martineau <mathew.j.martineau@linux.intel.com> | 2017-04-03 10:24:57 -0700 |
commit | e9cc0f689a7c0c9be6fed6861b3a3f49ad0e7a52 (patch) | |
tree | 070133bdca405a2359207c27567f64fe75f007c1 | |
parent | aaf66c883813f0078e3dafe7d20d1461321ac14f (diff) | |
download | linux-e9cc0f689a7c0c9be6fed6861b3a3f49ad0e7a52.tar.bz2 |
KEYS: Add a key restriction struct
Key link restrictions require restriction-specific data as well as a
restriction-specific function pointer. As a first step toward replacing
the restrict_link pointer in struct key, define a more general
key_restriction structure that captures the required function, key, and
key type pointers. Key type modules should not be pinned on account of
this key type pointer because the pointer will be cleared by the garbage
collector if the key type is unregistered.
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
-rw-r--r-- | include/linux/key.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/key.h b/include/linux/key.h index c59d1008c4fc..a06649f3223d 100644 --- a/include/linux/key.h +++ b/include/linux/key.h @@ -132,6 +132,12 @@ typedef int (*key_restrict_link_func_t)(struct key *dest_keyring, const union key_payload *payload, struct key *restriction_key); +struct key_restriction { + key_restrict_link_func_t check; + struct key *key; + struct key_type *keytype; +}; + /*****************************************************************************/ /* * authentication token / access credential / keyring |