diff options
-rw-r--r-- | Documentation/keys.txt | 12 | ||||
-rw-r--r-- | include/linux/key.h | 2 | ||||
-rw-r--r-- | security/keys/keyring.c | 2 |
3 files changed, 16 insertions, 0 deletions
diff --git a/Documentation/keys.txt b/Documentation/keys.txt index 60c665d9cfa..81d9aa09729 100644 --- a/Documentation/keys.txt +++ b/Documentation/keys.txt | |||
@@ -859,6 +859,18 @@ payload contents" for more information. | |||
859 | void unregister_key_type(struct key_type *type); | 859 | void unregister_key_type(struct key_type *type); |
860 | 860 | ||
861 | 861 | ||
862 | Under some circumstances, it may be desirable to desirable to deal with a | ||
863 | bundle of keys. The facility provides access to the keyring type for managing | ||
864 | such a bundle: | ||
865 | |||
866 | struct key_type key_type_keyring; | ||
867 | |||
868 | This can be used with a function such as request_key() to find a specific | ||
869 | keyring in a process's keyrings. A keyring thus found can then be searched | ||
870 | with keyring_search(). Note that it is not possible to use request_key() to | ||
871 | search a specific keyring, so using keyrings in this way is of limited utility. | ||
872 | |||
873 | |||
862 | =================================== | 874 | =================================== |
863 | NOTES ON ACCESSING PAYLOAD CONTENTS | 875 | NOTES ON ACCESSING PAYLOAD CONTENTS |
864 | =================================== | 876 | =================================== |
diff --git a/include/linux/key.h b/include/linux/key.h index 169f05e4863..a9220e75782 100644 --- a/include/linux/key.h +++ b/include/linux/key.h | |||
@@ -160,6 +160,8 @@ struct key { | |||
160 | */ | 160 | */ |
161 | union { | 161 | union { |
162 | struct list_head link; | 162 | struct list_head link; |
163 | unsigned long x[2]; | ||
164 | void *p[2]; | ||
163 | } type_data; | 165 | } type_data; |
164 | 166 | ||
165 | /* key data | 167 | /* key data |
diff --git a/security/keys/keyring.c b/security/keys/keyring.c index ad45ce73964..88292e3dee9 100644 --- a/security/keys/keyring.c +++ b/security/keys/keyring.c | |||
@@ -66,6 +66,8 @@ struct key_type key_type_keyring = { | |||
66 | .read = keyring_read, | 66 | .read = keyring_read, |
67 | }; | 67 | }; |
68 | 68 | ||
69 | EXPORT_SYMBOL(key_type_keyring); | ||
70 | |||
69 | /* | 71 | /* |
70 | * semaphore to serialise link/link calls to prevent two link calls in parallel | 72 | * semaphore to serialise link/link calls to prevent two link calls in parallel |
71 | * introducing a cycle | 73 | * introducing a cycle |