0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #ifndef _LINUX_SUNRPC_AUTH_GSS_H
0014 #define _LINUX_SUNRPC_AUTH_GSS_H
0015
0016 #include <linux/refcount.h>
0017 #include <linux/sunrpc/auth.h>
0018 #include <linux/sunrpc/svc.h>
0019 #include <linux/sunrpc/gss_api.h>
0020
0021 #define RPC_GSS_VERSION 1
0022
0023 #define MAXSEQ 0x80000000
0024
0025 enum rpc_gss_proc {
0026 RPC_GSS_PROC_DATA = 0,
0027 RPC_GSS_PROC_INIT = 1,
0028 RPC_GSS_PROC_CONTINUE_INIT = 2,
0029 RPC_GSS_PROC_DESTROY = 3
0030 };
0031
0032 enum rpc_gss_svc {
0033 RPC_GSS_SVC_NONE = 1,
0034 RPC_GSS_SVC_INTEGRITY = 2,
0035 RPC_GSS_SVC_PRIVACY = 3
0036 };
0037
0038
0039 struct rpc_gss_wire_cred {
0040 u32 gc_v;
0041 u32 gc_proc;
0042 u32 gc_seq;
0043 u32 gc_svc;
0044 struct xdr_netobj gc_ctx;
0045 };
0046
0047
0048 struct rpc_gss_wire_verf {
0049 u32 gv_flavor;
0050 struct xdr_netobj gv_verf;
0051 };
0052
0053
0054 struct rpc_gss_init_res {
0055 struct xdr_netobj gr_ctx;
0056 u32 gr_major;
0057 u32 gr_minor;
0058 u32 gr_win;
0059 struct xdr_netobj gr_token;
0060 };
0061
0062
0063
0064
0065
0066
0067
0068 struct gss_cl_ctx {
0069 refcount_t count;
0070 enum rpc_gss_proc gc_proc;
0071 u32 gc_seq;
0072 u32 gc_seq_xmit;
0073 spinlock_t gc_seq_lock;
0074 struct gss_ctx *gc_gss_ctx;
0075 struct xdr_netobj gc_wire_ctx;
0076 struct xdr_netobj gc_acceptor;
0077 u32 gc_win;
0078 unsigned long gc_expiry;
0079 struct rcu_head gc_rcu;
0080 };
0081
0082 struct gss_upcall_msg;
0083 struct gss_cred {
0084 struct rpc_cred gc_base;
0085 enum rpc_gss_svc gc_service;
0086 struct gss_cl_ctx __rcu *gc_ctx;
0087 struct gss_upcall_msg *gc_upcall;
0088 const char *gc_principal;
0089 unsigned long gc_upcall_timestamp;
0090 };
0091
0092 #endif
0093