1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 2 /* request_key authorisation token key type 3 * 4 * Copyright (C) 2005 Red Hat, Inc. All Rights Reserved. 5 * Written by David Howells (dhowells@redhat.com) 6 */ 7 8 #ifndef _KEYS_REQUEST_KEY_AUTH_TYPE_H 9 #define _KEYS_REQUEST_KEY_AUTH_TYPE_H 10 11 #include <linux/key.h> 12 #include <linux/refcount.h> 13 14 /* 15 * Authorisation record for request_key(). 16 */ 17 struct request_key_auth { 18 struct rcu_head rcu; 19 refcount_t usage; 20 struct key *target_key; 21 struct key *dest_keyring; 22 const struct cred *cred; 23 void *callout_info; 24 size_t callout_len; 25 struct pid *pid; 26 char op[8]; 27 } __randomize_layout; 28 get_request_key_auth(const struct key * key)29static inline struct request_key_auth *get_request_key_auth(const struct key *key) 30 { 31 return key->payload.data[0]; 32 } 33 34 35 #endif /* _KEYS_REQUEST_KEY_AUTH_TYPE_H */ 36