~ubuntu-branches/ubuntu/maverick/krb5/maverick

« back to all changes in this revision

Viewing changes to src/include/gssrpc/svc_auth.h

  • Committer: Bazaar Package Importer
  • Author(s): Sam Hartman, Russ Allbery, Sam Hartman
  • Date: 2008-08-21 10:41:41 UTC
  • mfrom: (11.1.15 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080821104141-a0f9c4o4cpo8xd0o
Tags: 1.6.dfsg.4~beta1-4
[ Russ Allbery ]
* Translation updates:
  - Swedish, thanks Martin Bagge.  (Closes: #487669, #491774)
  - Italian, thanks Luca Monducci.  (Closes: #493962)

[ Sam Hartman ]
* Translation Updates:
    - Dutch, Thanks Vincent Zweije, Closes: #495733

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* @(#)svc_auth.h       2.1 88/07/29 4.0 RPCSRC */
 
2
/*
 
3
 * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
 
4
 * unrestricted use provided that this legend is included on all tape
 
5
 * media and as a part of the software program in whole or part.  Users
 
6
 * may copy or modify Sun RPC without charge, but are not authorized
 
7
 * to license or distribute it to anyone else except as part of a product or
 
8
 * program developed by the user.
 
9
 * 
 
10
 * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
 
11
 * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
 
12
 * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
 
13
 * 
 
14
 * Sun RPC is provided with no support and without any obligation on the
 
15
 * part of Sun Microsystems, Inc. to assist in its use, correction,
 
16
 * modification or enhancement.
 
17
 * 
 
18
 * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
 
19
 * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
 
20
 * OR ANY PART THEREOF.
 
21
 * 
 
22
 * In no event will Sun Microsystems, Inc. be liable for any lost revenue
 
23
 * or profits or other special, indirect and consequential damages, even if
 
24
 * Sun has been advised of the possibility of such damages.
 
25
 * 
 
26
 * Sun Microsystems, Inc.
 
27
 * 2550 Garcia Avenue
 
28
 * Mountain View, California  94043
 
29
 */
 
30
/*      @(#)svc_auth.h 1.6 86/07/16 SMI      */
 
31
 
 
32
/*
 
33
 * svc_auth.h, Service side of rpc authentication.
 
34
 * 
 
35
 * Copyright (C) 1984, Sun Microsystems, Inc.
 
36
 */
 
37
 
 
38
/*
 
39
 * Interface to server-side authentication flavors.
 
40
 */
 
41
 
 
42
#ifndef GSSRPC_SVC_AUTH_H
 
43
#define GSSRPC_SVC_AUTH_H
 
44
 
 
45
#include <gssapi/gssapi.h>
 
46
 
 
47
GSSRPC__BEGIN_DECLS
 
48
 
 
49
struct svc_req;
 
50
 
 
51
typedef struct SVCAUTH {
 
52
        struct svc_auth_ops {
 
53
                int     (*svc_ah_wrap)(struct SVCAUTH *, XDR *, xdrproc_t,
 
54
                                       caddr_t);
 
55
                int     (*svc_ah_unwrap)(struct SVCAUTH *, XDR *, xdrproc_t,
 
56
                                         caddr_t);
 
57
                int     (*svc_ah_destroy)(struct SVCAUTH *);
 
58
        } *svc_ah_ops;
 
59
        void * svc_ah_private;
 
60
} SVCAUTH;
 
61
 
 
62
#ifdef GSSRPC__IMPL
 
63
 
 
64
extern SVCAUTH svc_auth_none;
 
65
 
 
66
extern struct svc_auth_ops svc_auth_none_ops;
 
67
extern struct svc_auth_ops svc_auth_gssapi_ops;
 
68
extern struct svc_auth_ops svc_auth_gss_ops;
 
69
 
 
70
/*
 
71
 * Server side authenticator
 
72
 */
 
73
/* RENAMED: should be _authenticate. */
 
74
extern enum auth_stat gssrpc__authenticate(struct svc_req *rqst,
 
75
        struct rpc_msg *msg, bool_t *no_dispatch);
 
76
 
 
77
#define SVCAUTH_WRAP(auth, xdrs, xfunc, xwhere) \
 
78
     ((*((auth)->svc_ah_ops->svc_ah_wrap))(auth, xdrs, xfunc, xwhere))
 
79
#define SVCAUTH_UNWRAP(auth, xdrs, xfunc, xwhere) \
 
80
     ((*((auth)->svc_ah_ops->svc_ah_unwrap))(auth, xdrs, xfunc, xwhere))
 
81
#define SVCAUTH_DESTROY(auth) \
 
82
     ((*((auth)->svc_ah_ops->svc_ah_destroy))(auth))
 
83
 
 
84
/* no authentication */
 
85
/* RENAMED: should be _svcauth_none. */
 
86
enum auth_stat gssrpc__svcauth_none(struct svc_req *,
 
87
        struct rpc_msg *, bool_t *);
 
88
/* unix style (uid, gids) */
 
89
/* RENAMED: shoudl be _svcauth_unix. */
 
90
enum auth_stat gssrpc__svcauth_unix(struct svc_req *,
 
91
        struct rpc_msg *, bool_t *);
 
92
/* short hand unix style */
 
93
/* RENAMED: should be _svcauth_short. */
 
94
enum auth_stat gssrpc__svcauth_short(struct svc_req *,
 
95
        struct rpc_msg *, bool_t *);
 
96
/* GSS-API style */
 
97
/* RENAMED: should be _svcauth_gssapi. */
 
98
enum auth_stat gssrpc__svcauth_gssapi(struct svc_req *,
 
99
        struct rpc_msg *, bool_t *);
 
100
/* RPCSEC_GSS */
 
101
enum auth_stat gssrpc__svcauth_gss(struct svc_req *,
 
102
        struct rpc_msg *, bool_t *);
 
103
 
 
104
#endif /* defined(GSSRPC__IMPL) */
 
105
 
 
106
/*
 
107
 * Approved way of getting principal of caller
 
108
 */
 
109
char *svcauth_gss_get_principal(SVCAUTH *auth);
 
110
/*
 
111
 * Approved way of setting server principal
 
112
 */
 
113
bool_t svcauth_gss_set_svc_name(gss_name_t name);
 
114
 
 
115
GSSRPC__END_DECLS
 
116
 
 
117
#endif /* !defined(GSSRPC_SVC_AUTH_H) */