diff options
Diffstat (limited to 'Documentation/security/keys.txt')
-rw-r--r-- | Documentation/security/keys.txt | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/Documentation/security/keys.txt b/Documentation/security/keys.txt index a4c33f1..7b4145d 100644 --- a/Documentation/security/keys.txt +++ b/Documentation/security/keys.txt @@ -865,14 +865,15 @@ encountered: calling processes has a searchable link to the key from one of its keyrings. There are three functions for dealing with these: - key_ref_t make_key_ref(const struct key *key, bool possession); + key_ref_t make_key_ref(const struct key *key, + unsigned long possession); struct key *key_ref_to_ptr(const key_ref_t key_ref); - bool is_key_possessed(const key_ref_t key_ref); + unsigned long is_key_possessed(const key_ref_t key_ref); The first function constructs a key reference from a key pointer and - possession information (which must be true or false). + possession information (which must be 0 or 1 and not any other value). The second function retrieves the key pointer from a reference and the third retrieves the possession flag. @@ -960,17 +961,14 @@ payload contents" for more information. the argument will not be parsed. -(*) Extra references can be made to a key by calling one of the following - functions: +(*) Extra references can be made to a key by calling the following function: - struct key *__key_get(struct key *key); struct key *key_get(struct key *key); - Keys so references will need to be disposed of by calling key_put() when - they've been finished with. The key pointer passed in will be returned. - - In the case of key_get(), if the pointer is NULL or CONFIG_KEYS is not set - then the key will not be dereferenced and no increment will take place. + These need to be disposed of by calling key_put() when they've been + finished with. The key pointer passed in will be returned. If the pointer + is NULL or CONFIG_KEYS is not set then the key will not be dereferenced and + no increment will take place. (*) A key's serial number can be obtained by calling: |