Lines Matching full:key
2 /* Request key authorisation token key definition.
7 * See Documentation/security/keys/request-key.rst
20 static int request_key_auth_instantiate(struct key *,
22 static void request_key_auth_describe(const struct key *, struct seq_file *);
23 static void request_key_auth_revoke(struct key *);
24 static void request_key_auth_destroy(struct key *);
25 static long request_key_auth_read(const struct key *, char *, size_t);
29 * The request-key authorisation key type definition.
53 * Instantiate a request-key authorisation key.
55 static int request_key_auth_instantiate(struct key *key,
58 rcu_assign_keypointer(key, (struct request_key_auth *)prep->data);
65 static void request_key_auth_describe(const struct key *key,
68 struct request_key_auth *rka = dereference_key_rcu(key);
73 seq_puts(m, "key:");
74 seq_puts(m, key->description);
75 if (key_is_positive(key))
81 * - the key's semaphore is read-locked
83 static long request_key_auth_read(const struct key *key,
86 struct request_key_auth *rka = dereference_key_locked(key);
120 * Take a reference to the request-key authorisation payload so callers can
123 struct request_key_auth *request_key_auth_get(struct key *authkey)
156 * Handle revocation of an authorisation token key.
158 * Called with the key sem write-locked.
160 static void request_key_auth_revoke(struct key *key)
162 struct request_key_auth *rka = dereference_key_locked(key);
164 kenter("{%d}", key->serial);
167 rcu_assign_keypointer(key, NULL);
172 * Destroy an instantiation authorisation token key.
174 static void request_key_auth_destroy(struct key *key)
176 struct request_key_auth *rka = rcu_access_pointer(key->payload.rcu_data0);
178 kenter("{%d}", key->serial);
180 rcu_assign_keypointer(key, NULL);
186 * Create an authorisation token for /sbin/request-key or whoever to gain
189 struct key *request_key_auth_new(struct key *target, const char *op,
191 struct key *dest_keyring)
195 struct key *authkey = NULL;
212 /* see if the calling process is already servicing the key request of
218 /* if the auth key has been revoked, then the key we're
242 /* allocate the auth key */
254 /* construct the auth key */
272 * Search the current process's keyrings for the authorisation key for
273 * instantiation of a key.
275 struct key *key_get_instantiation_authkey(key_serial_t target_id)
288 struct key *authkey;