diff options
author | James Morris <james.l.morris@oracle.com> | 2017-04-18 07:37:51 +1000 |
---|---|---|
committer | James Morris <james.l.morris@oracle.com> | 2017-04-18 07:37:51 +1000 |
commit | 30a83251dd8b7e3566be9ea8c4921bafc21bee8f (patch) | |
tree | 1d86ec5f4e8aaeea0cf9c5a5c19003e6cd0730a8 /include/keys/system_keyring.h | |
parent | 622f6e3265707ebf02ba776ac6e68003bcc31213 (diff) | |
parent | 4cd4ca7cc848bedc70b5d0acac9d1ae33d73513a (diff) |
Merge tag 'keys-next-20170412' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs into next
Diffstat (limited to 'include/keys/system_keyring.h')
-rw-r--r-- | include/keys/system_keyring.h | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/include/keys/system_keyring.h b/include/keys/system_keyring.h index fbd4647767e9..359c2f936004 100644 --- a/include/keys/system_keyring.h +++ b/include/keys/system_keyring.h @@ -18,7 +18,8 @@ extern int restrict_link_by_builtin_trusted(struct key *keyring, const struct key_type *type, - const union key_payload *payload); + const union key_payload *payload, + struct key *restriction_key); #else #define restrict_link_by_builtin_trusted restrict_link_reject @@ -28,11 +29,24 @@ extern int restrict_link_by_builtin_trusted(struct key *keyring, extern int restrict_link_by_builtin_and_secondary_trusted( struct key *keyring, const struct key_type *type, - const union key_payload *payload); + const union key_payload *payload, + struct key *restriction_key); #else #define restrict_link_by_builtin_and_secondary_trusted restrict_link_by_builtin_trusted #endif +#ifdef CONFIG_SYSTEM_BLACKLIST_KEYRING +extern int mark_hash_blacklisted(const char *hash); +extern int is_hash_blacklisted(const u8 *hash, size_t hash_len, + const char *type); +#else +static inline int is_hash_blacklisted(const u8 *hash, size_t hash_len, + const char *type) +{ + return 0; +} +#endif + #ifdef CONFIG_IMA_BLACKLIST_KEYRING extern struct key *ima_blacklist_keyring; |