svc_auth.c (a986ef5788bd3338d2a970eb96104824e4a0e3bb) svc_auth.c (235baf269e492159336326a12da1ca09fbba85db)
1/* $NetBSD: svc_auth.c,v 1.12 2000/07/06 03:10:35 christos Exp $ */
2
3/*
4 * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
5 * unrestricted use provided that this legend is included on all tape
6 * media and as a part of the software program in whole or part. Users
7 * may copy or modify Sun RPC without charge, but are not authorized
8 * to license or distribute it to anyone else except as part of a product or

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

45 */
46
47#include "namespace.h"
48#include "reentrant.h"
49#include <sys/types.h>
50#include <rpc/rpc.h>
51#include <stdlib.h>
52#include "un-namespace.h"
1/* $NetBSD: svc_auth.c,v 1.12 2000/07/06 03:10:35 christos Exp $ */
2
3/*
4 * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
5 * unrestricted use provided that this legend is included on all tape
6 * media and as a part of the software program in whole or part. Users
7 * may copy or modify Sun RPC without charge, but are not authorized
8 * to license or distribute it to anyone else except as part of a product or

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

45 */
46
47#include "namespace.h"
48#include "reentrant.h"
49#include <sys/types.h>
50#include <rpc/rpc.h>
51#include <stdlib.h>
52#include "un-namespace.h"
53#include "mt_misc.h"
53
54/*
55 * svcauthsw is the bdevsw of server side authentication.
56 *
57 * Server side authenticators are called from authenticate by
58 * using the client auth struct flavor field to index into svcauthsw.
59 * The server auth flavors must implement a routine that looks
60 * like:

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

95enum auth_stat
96_authenticate(rqst, msg)
97 struct svc_req *rqst;
98 struct rpc_msg *msg;
99{
100 int cred_flavor;
101 struct authsvc *asp;
102 enum auth_stat dummy;
54
55/*
56 * svcauthsw is the bdevsw of server side authentication.
57 *
58 * Server side authenticators are called from authenticate by
59 * using the client auth struct flavor field to index into svcauthsw.
60 * The server auth flavors must implement a routine that looks
61 * like:

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

96enum auth_stat
97_authenticate(rqst, msg)
98 struct svc_req *rqst;
99 struct rpc_msg *msg;
100{
101 int cred_flavor;
102 struct authsvc *asp;
103 enum auth_stat dummy;
103 extern mutex_t authsvc_lock;
104
105/* VARIABLES PROTECTED BY authsvc_lock: asp, Auths */
106
107 rqst->rq_cred = msg->rm_call.cb_cred;
108 rqst->rq_xprt->xp_verf.oa_flavor = _null_auth.oa_flavor;
109 rqst->rq_xprt->xp_verf.oa_length = 0;
110 cred_flavor = rqst->rq_cred.oa_flavor;
111 switch (cred_flavor) {

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

167 */
168
169int
170svc_auth_reg(cred_flavor, handler)
171 int cred_flavor;
172 enum auth_stat (*handler)(struct svc_req *, struct rpc_msg *);
173{
174 struct authsvc *asp;
104
105/* VARIABLES PROTECTED BY authsvc_lock: asp, Auths */
106
107 rqst->rq_cred = msg->rm_call.cb_cred;
108 rqst->rq_xprt->xp_verf.oa_flavor = _null_auth.oa_flavor;
109 rqst->rq_xprt->xp_verf.oa_length = 0;
110 cred_flavor = rqst->rq_cred.oa_flavor;
111 switch (cred_flavor) {

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

167 */
168
169int
170svc_auth_reg(cred_flavor, handler)
171 int cred_flavor;
172 enum auth_stat (*handler)(struct svc_req *, struct rpc_msg *);
173{
174 struct authsvc *asp;
175 extern mutex_t authsvc_lock;
176
177 switch (cred_flavor) {
178 case AUTH_NULL:
179 case AUTH_SYS:
180 case AUTH_SHORT:
181#ifdef DES_BUILTIN
182 case AUTH_DES:
183#endif

--- 28 unchanged lines hidden ---
175
176 switch (cred_flavor) {
177 case AUTH_NULL:
178 case AUTH_SYS:
179 case AUTH_SHORT:
180#ifdef DES_BUILTIN
181 case AUTH_DES:
182#endif

--- 28 unchanged lines hidden ---