Message ID | 20161020235523.11703-5-mathew.j.martineau@linux.intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/include/linux/key.h b/include/linux/key.h index 7efb8a9..768d189 100644 --- a/include/linux/key.h +++ b/include/linux/key.h @@ -131,6 +131,12 @@ typedef int (*restrict_link_func_t)(struct key *dest_keyring, const union key_payload *payload, void *data); +struct key_restriction { + restrict_link_func_t check; + void (*free_data)(void *data); + void *data; +}; + /*****************************************************************************/ /* * authentication token / access credential / keyring
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 function and data, as well as a data freeing function. Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com> --- include/linux/key.h | 6 ++++++ 1 file changed, 6 insertions(+)