aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sunrpc/auth_gss.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/linux/sunrpc/auth_gss.h
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'include/linux/sunrpc/auth_gss.h')
-rw-r--r--include/linux/sunrpc/auth_gss.h97
1 files changed, 97 insertions, 0 deletions
diff --git a/include/linux/sunrpc/auth_gss.h b/include/linux/sunrpc/auth_gss.h
new file mode 100644
index 000000000000..03084dc4bb6a
--- /dev/null
+++ b/include/linux/sunrpc/auth_gss.h
@@ -0,0 +1,97 @@
1/*
2 * linux/include/linux/auth_gss.h
3 *
4 * Declarations for RPCSEC_GSS
5 *
6 * Dug Song <dugsong@monkey.org>
7 * Andy Adamson <andros@umich.edu>
8 * Bruce Fields <bfields@umich.edu>
9 * Copyright (c) 2000 The Regents of the University of Michigan
10 *
11 * $Id$
12 */
13
14#ifndef _LINUX_SUNRPC_AUTH_GSS_H
15#define _LINUX_SUNRPC_AUTH_GSS_H
16
17#ifdef __KERNEL__
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
26enum 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
33enum 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: */
40struct 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: */
49struct 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 */
55struct 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
69struct gss_cl_ctx {
70 atomic_t count;
71 enum rpc_gss_proc gc_proc;
72 u32 gc_seq;
73 spinlock_t gc_seq_lock;
74 struct gss_ctx *gc_gss_ctx;
75 struct xdr_netobj gc_wire_ctx;
76 u32 gc_win;
77 unsigned long gc_expiry;
78};
79
80struct gss_upcall_msg;
81struct gss_cred {
82 struct rpc_cred gc_base;
83 enum rpc_gss_svc gc_service;
84 struct gss_cl_ctx *gc_ctx;
85 struct gss_upcall_msg *gc_upcall;
86};
87
88#define gc_uid gc_base.cr_uid
89#define gc_count gc_base.cr_count
90#define gc_flags gc_base.cr_flags
91#define gc_expire gc_base.cr_expire
92
93void print_hexl(u32 *p, u_int length, u_int offset);
94
95#endif /* __KERNEL__ */
96#endif /* _LINUX_SUNRPC_AUTH_GSS_H */
97