request_key_auth-type.h 747 B

123456789101112131415161718192021222324252627282930313233
  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. #ifndef _KEYS_REQUEST_KEY_AUTH_TYPE_H
  8. #define _KEYS_REQUEST_KEY_AUTH_TYPE_H
  9. #include <linux/key.h>
  10. /*
  11. * Authorisation record for request_key().
  12. */
  13. struct request_key_auth {
  14. struct rcu_head rcu;
  15. struct key *target_key;
  16. struct key *dest_keyring;
  17. const struct cred *cred;
  18. void *callout_info;
  19. size_t callout_len;
  20. pid_t pid;
  21. char op[8];
  22. } __randomize_layout;
  23. static inline struct request_key_auth *get_request_key_auth(const struct key *key)
  24. {
  25. return key->payload.data[0];
  26. }
  27. #endif /* _KEYS_REQUEST_KEY_AUTH_TYPE_H */