Messages in this thread | | | Subject | Re: [RFC PATCH 11/12] certs: Add a secondary system keyring that can be added to dynamically [ver #3] | From | Mimi Zohar <> | Date | Tue, 05 Apr 2016 20:37:19 -0400 |
| |
On Wed, 2016-03-09 at 11:19 +0000, David Howells wrote:
> +#ifdef CONFIG_SECONDARY_TRUSTED_KEYRING > +/** > + * restrict_link_by_builtin_and_secondary_trusted - Restrict keyring > + * addition by both builtin and secondary keyrings > + * > + * Restrict the addition of keys into a keyring based on the key-to-be-added > + * being vouched for by a key in either the built-in or the secondary system > + * keyrings. > + */ > +int restrict_link_by_builtin_and_secondary_trusted( > + struct key *keyring, > + const struct key_type *type, > + const union key_payload *payload) > +{ > + /* If we have a secondary trusted keyring, then that contains a link > + * through to the builtin keyring and the search will follow that link. > + */ > + if (type == &key_type_keyring && > + keyring == secondary_trusted_keys && > + payload == &builtin_trusted_keys->payload) > + /* Allow the builtin keyring to be added to the secondary */ > + return 0; > + > + return restrict_link_by_signature(builtin_trusted_keys, type, payload);
Shouldn't thi be secondary_trusted_keys?
Mimi
> +} > +#endif
| |