|
||||
File indexing completed on 2025-01-18 10:13:02
0001 /* $NetBSD: svc_auth.h,v 1.8 2000/06/02 22:57:57 fvdl Exp $ */ 0002 0003 /* 0004 * Copyright (c) 2009, Sun Microsystems, Inc. 0005 * All rights reserved. 0006 * 0007 * Redistribution and use in source and binary forms, with or without 0008 * modification, are permitted provided that the following conditions are met: 0009 * - Redistributions of source code must retain the above copyright notice, 0010 * this list of conditions and the following disclaimer. 0011 * - Redistributions in binary form must reproduce the above copyright notice, 0012 * this list of conditions and the following disclaimer in the documentation 0013 * and/or other materials provided with the distribution. 0014 * - Neither the name of Sun Microsystems, Inc. nor the names of its 0015 * contributors may be used to endorse or promote products derived 0016 * from this software without specific prior written permission. 0017 * 0018 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 0019 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 0020 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 0021 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 0022 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 0023 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 0024 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 0025 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 0026 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 0027 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 0028 * POSSIBILITY OF SUCH DAMAGE. 0029 * 0030 * from: @(#)svc_auth.h 1.6 86/07/16 SMI 0031 * @(#)svc_auth.h 2.1 88/07/29 4.0 RPCSRC 0032 * $FreeBSD: src/include/rpc/svc_auth.h,v 1.14 2002/03/23 17:24:55 imp Exp $ 0033 */ 0034 0035 /* 0036 * svc_auth.h, Service side of rpc authentication. 0037 * 0038 * Copyright (C) 1984, Sun Microsystems, Inc. 0039 */ 0040 0041 #ifndef _RPC_SVC_AUTH_H 0042 #define _RPC_SVC_AUTH_H 0043 0044 /* 0045 * Interface to server-side authentication flavors. 0046 */ 0047 typedef struct SVCAUTH { 0048 struct svc_auth_ops { 0049 int (*svc_ah_wrap)(struct SVCAUTH *, XDR *, xdrproc_t, 0050 caddr_t); 0051 int (*svc_ah_unwrap)(struct SVCAUTH *, XDR *, xdrproc_t, 0052 caddr_t); 0053 int (*svc_ah_destroy)(struct SVCAUTH *); 0054 } *svc_ah_ops; 0055 caddr_t svc_ah_private; 0056 } SVCAUTH; 0057 0058 #define SVCAUTH_WRAP(auth, xdrs, xfunc, xwhere) \ 0059 ((*((auth)->svc_ah_ops->svc_ah_wrap))(auth, xdrs, xfunc, xwhere)) 0060 #define SVCAUTH_UNWRAP(auth, xdrs, xfunc, xwhere) \ 0061 ((*((auth)->svc_ah_ops->svc_ah_unwrap))(auth, xdrs, xfunc, xwhere)) 0062 #define SVCAUTH_DESTROY(auth) \ 0063 ((*((auth)->svc_ah_ops->svc_ah_destroy))(auth)) 0064 0065 /* 0066 * Server side authenticator 0067 */ 0068 #ifdef __cplusplus 0069 extern "C" { 0070 #endif 0071 extern enum auth_stat _gss_authenticate(struct svc_req *, struct rpc_msg *, 0072 bool_t *); 0073 extern enum auth_stat _authenticate(struct svc_req *, struct rpc_msg *); 0074 extern int svc_auth_reg(int, enum auth_stat (*)(struct svc_req *, 0075 struct rpc_msg *)); 0076 0077 #ifdef __cplusplus 0078 } 0079 #endif 0080 0081 #endif /* !_RPC_SVC_AUTH_H */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |