rpcbind.h (86632942f304299ddf8de785093de7383cda6137) rpcbind.h (0ea5e3a571e3da934507bdd32924d11659c70704)
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
7 * with the License.
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 *
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
13 *
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
19 *
20 * CDDL HEADER END
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
21 */
22/*
23 * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
20 *
21 * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
25 */
26/* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */
27/* All Rights Reserved */
28/*
29 * University Copyright- Copyright (c) 1982, 1986, 1988
30 * The Regents of the University of California
31 * All Rights Reserved

--- 45 unchanged lines hidden (view full) ---

77extern bool_t is_bound();
78extern void my_svc_run();
79
80/* TCP wrapper functions and variables. */
81extern boolean_t localxprt(SVCXPRT *, boolean_t);
82extern void qsyslog(int pri, const char *fmt, ...);
83extern boolean_t rpcb_check(SVCXPRT *, rpcproc_t, boolean_t);
84extern void rpcb_log(boolean_t, SVCXPRT *, rpcproc_t, rpcprog_t, boolean_t);
22 * Use is subject to license terms.
23 */
24/* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */
25/* All Rights Reserved */
26/*
27 * University Copyright- Copyright (c) 1982, 1986, 1988
28 * The Regents of the University of California
29 * All Rights Reserved

--- 45 unchanged lines hidden (view full) ---

75extern bool_t is_bound();
76extern void my_svc_run();
77
78/* TCP wrapper functions and variables. */
79extern boolean_t localxprt(SVCXPRT *, boolean_t);
80extern void qsyslog(int pri, const char *fmt, ...);
81extern boolean_t rpcb_check(SVCXPRT *, rpcproc_t, boolean_t);
82extern void rpcb_log(boolean_t, SVCXPRT *, rpcproc_t, rpcprog_t, boolean_t);
85extern boolean_t allow_indirect, wrap_enabled, verboselog;
83extern boolean_t allow_indirect, wrap_enabled, verboselog, local_only;
86
87#define svc_getgencaller(transp) \
88 ((struct sockaddr_gen *)svc_getrpccaller((transp))->buf)
89
90#define RPCB_CHECK(xprt, proc) \
84
85#define svc_getgencaller(transp) \
86 ((struct sockaddr_gen *)svc_getrpccaller((transp))->buf)
87
88#define RPCB_CHECK(xprt, proc) \
91 if (wrap_enabled && !rpcb_check((xprt), (proc), B_FALSE)) \
89 if ((wrap_enabled || local_only) && \
90 !rpcb_check((xprt), (proc), B_FALSE)) \
92 return
93
94#define PMAP_CHECK(xprt, proc) \
91 return
92
93#define PMAP_CHECK(xprt, proc) \
95 if (wrap_enabled && !rpcb_check((xprt), (proc), B_TRUE)) \
94 if ((wrap_enabled || local_only) && \
95 !rpcb_check((xprt), (proc), B_TRUE)) \
96 return
97
98#define PMAP_CHECK_RET(xprt, proc, ret) \
96 return
97
98#define PMAP_CHECK_RET(xprt, proc, ret) \
99 if (wrap_enabled && !rpcb_check((xprt), (proc), B_TRUE)) \
99 if ((wrap_enabled || local_only) && \
100 !rpcb_check((xprt), (proc), B_TRUE)) \
100 return (ret)
101
102#define RPCB_LOG(xprt, proc, prog) \
103 if (wrap_enabled) \
104 rpcb_log(B_TRUE, (xprt), (proc), (prog), B_FALSE)
105
106#define PMAP_LOG(ans, xprt, proc, prog) \
107 if (wrap_enabled) \

--- 36 unchanged lines hidden ---
101 return (ret)
102
103#define RPCB_LOG(xprt, proc, prog) \
104 if (wrap_enabled) \
105 rpcb_log(B_TRUE, (xprt), (proc), (prog), B_FALSE)
106
107#define PMAP_LOG(ans, xprt, proc, prog) \
108 if (wrap_enabled) \

--- 36 unchanged lines hidden ---