Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-or-later */
0002 /* request_key authorisation token key type
0003  *
0004  * Copyright (C) 2005 Red Hat, Inc. All Rights Reserved.
0005  * Written by David Howells (dhowells@redhat.com)
0006  */
0007 
0008 #ifndef _KEYS_REQUEST_KEY_AUTH_TYPE_H
0009 #define _KEYS_REQUEST_KEY_AUTH_TYPE_H
0010 
0011 #include <linux/key.h>
0012 
0013 /*
0014  * Authorisation record for request_key().
0015  */
0016 struct request_key_auth {
0017     struct rcu_head     rcu;
0018     struct key      *target_key;
0019     struct key      *dest_keyring;
0020     const struct cred   *cred;
0021     void            *callout_info;
0022     size_t          callout_len;
0023     pid_t           pid;
0024     char            op[8];
0025 } __randomize_layout;
0026 
0027 static inline struct request_key_auth *get_request_key_auth(const struct key *key)
0028 {
0029     return key->payload.data[0];
0030 }
0031 
0032 
0033 #endif /* _KEYS_REQUEST_KEY_AUTH_TYPE_H */