~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/sunrpc/auth_gss.h

Version: ~ [ linux-5.15-rc6 ] ~ [ linux-5.14.14 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.75 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.155 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.213 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.252 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.287 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.289 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.18.140 ] ~ [ linux-3.16.85 ] ~ [ linux-3.14.79 ] ~ [ linux-3.12.74 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 */
  2 /*
  3  * linux/include/linux/sunrpc/auth_gss.h
  4  *
  5  * Declarations for RPCSEC_GSS
  6  *
  7  * Dug Song <dugsong@monkey.org>
  8  * Andy Adamson <andros@umich.edu>
  9  * Bruce Fields <bfields@umich.edu>
 10  * Copyright (c) 2000 The Regents of the University of Michigan
 11  */
 12 
 13 #ifndef _LINUX_SUNRPC_AUTH_GSS_H
 14 #define _LINUX_SUNRPC_AUTH_GSS_H
 15 
 16 #ifdef __KERNEL__
 17 #include <linux/refcount.h>
 18 #include <linux/sunrpc/auth.h>
 19 #include <linux/sunrpc/svc.h>
 20 #include <linux/sunrpc/gss_api.h>
 21 
 22 #define RPC_GSS_VERSION         1
 23 
 24 #define MAXSEQ 0x80000000 /* maximum legal sequence number, from rfc 2203 */
 25 
 26 enum rpc_gss_proc {
 27         RPC_GSS_PROC_DATA = 0,
 28         RPC_GSS_PROC_INIT = 1,
 29         RPC_GSS_PROC_CONTINUE_INIT = 2,
 30         RPC_GSS_PROC_DESTROY = 3
 31 };
 32 
 33 enum rpc_gss_svc {
 34         RPC_GSS_SVC_NONE = 1,
 35         RPC_GSS_SVC_INTEGRITY = 2,
 36         RPC_GSS_SVC_PRIVACY = 3
 37 };
 38 
 39 /* on-the-wire gss cred: */
 40 struct rpc_gss_wire_cred {
 41         u32                     gc_v;           /* version */
 42         u32                     gc_proc;        /* control procedure */
 43         u32                     gc_seq;         /* sequence number */
 44         u32                     gc_svc;         /* service */
 45         struct xdr_netobj       gc_ctx;         /* context handle */
 46 };
 47 
 48 /* on-the-wire gss verifier: */
 49 struct rpc_gss_wire_verf {
 50         u32                     gv_flavor;
 51         struct xdr_netobj       gv_verf;
 52 };
 53 
 54 /* return from gss NULL PROC init sec context */
 55 struct rpc_gss_init_res {
 56         struct xdr_netobj       gr_ctx;         /* context handle */
 57         u32                     gr_major;       /* major status */
 58         u32                     gr_minor;       /* minor status */
 59         u32                     gr_win;         /* sequence window */
 60         struct xdr_netobj       gr_token;       /* token */
 61 };
 62 
 63 /* The gss_cl_ctx struct holds all the information the rpcsec_gss client
 64  * code needs to know about a single security context.  In particular,
 65  * gc_gss_ctx is the context handle that is used to do gss-api calls, while
 66  * gc_wire_ctx is the context handle that is used to identify the context on
 67  * the wire when communicating with a server. */
 68 
 69 struct gss_cl_ctx {
 70         refcount_t              count;
 71         enum rpc_gss_proc       gc_proc;
 72         u32                     gc_seq;
 73         u32                     gc_seq_xmit;
 74         spinlock_t              gc_seq_lock;
 75         struct gss_ctx          *gc_gss_ctx;
 76         struct xdr_netobj       gc_wire_ctx;
 77         struct xdr_netobj       gc_acceptor;
 78         u32                     gc_win;
 79         unsigned long           gc_expiry;
 80         struct rcu_head         gc_rcu;
 81 };
 82 
 83 struct gss_upcall_msg;
 84 struct gss_cred {
 85         struct rpc_cred         gc_base;
 86         enum rpc_gss_svc        gc_service;
 87         struct gss_cl_ctx __rcu *gc_ctx;
 88         struct gss_upcall_msg   *gc_upcall;
 89         const char              *gc_principal;
 90         unsigned long           gc_upcall_timestamp;
 91 };
 92 
 93 #endif /* __KERNEL__ */
 94 #endif /* _LINUX_SUNRPC_AUTH_GSS_H */
 95 
 96 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp