ReactOS 0.4.15-dev-7953-g1f49173
svc_auth.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  __svcauth
 
struct  __svcauth::svc_auth_ops
 

Macros

#define SVCAUTH_DESTROY(cred)   ((*(cred)->svc_ah_ops->svc_ah_destroy)())
 
#define svcauth_destroy(cred)   ((*(cred)->svc_ah_ops->svc_ah_destroy)())
 

Typedefs

typedef struct __svcauth SVCAUTH
 

Functions

__BEGIN_DECLS enum auth_stat _authenticate (struct svc_req *, struct rpc_msg *)
 
int svc_auth_reg (int, enum auth_stat(*)(struct svc_req *, struct rpc_msg *))
 

Macro Definition Documentation

◆ SVCAUTH_DESTROY

#define SVCAUTH_DESTROY (   cred)    ((*(cred)->svc_ah_ops->svc_ah_destroy)())

Definition at line 56 of file svc_auth.h.

◆ svcauth_destroy

#define svcauth_destroy (   cred)    ((*(cred)->svc_ah_ops->svc_ah_destroy)())

Definition at line 57 of file svc_auth.h.

Typedef Documentation

◆ SVCAUTH

Function Documentation

◆ _authenticate()

__BEGIN_DECLS enum auth_stat _authenticate ( struct svc_req rqst,
struct rpc_msg msg 
)

Definition at line 86 of file svc_auth.c.

89{
90 int cred_flavor;
91 struct authsvc *asp;
92 enum auth_stat dummy;
93 extern mutex_t authsvc_lock;
94
95/* VARIABLES PROTECTED BY authsvc_lock: asp, Auths */
96
97 rqst->rq_cred = msg->rm_call.cb_cred;
98 rqst->rq_xprt->xp_verf.oa_flavor = _null_auth.oa_flavor;
99 rqst->rq_xprt->xp_verf.oa_length = 0;
100 cred_flavor = rqst->rq_cred.oa_flavor;
101 switch (cred_flavor) {
102 case AUTH_NULL:
103 dummy = _svcauth_null(rqst, msg);
104 return (dummy);
105 case AUTH_SYS:
106 dummy = _svcauth_unix(rqst, msg);
107 return (dummy);
108 case AUTH_SHORT:
109 dummy = _svcauth_short(rqst, msg);
110 return (dummy);
111#ifdef DES_BUILTIN
112 case AUTH_DES:
113 dummy = _svcauth_des(rqst, msg);
114 return (dummy);
115#endif
116 default:
117 break;
118 }
119
120 /* flavor doesn't match any of the builtin types, so try new ones */
122 for (asp = Auths; asp; asp = asp->next) {
123 if (asp->flavor == cred_flavor) {
124 enum auth_stat as;
125
126 as = (*asp->handler)(rqst, msg);
128 return (as);
129 }
130 }
132
133 return (AUTH_REJECTEDCRED);
134}
#define msg(x)
Definition: auth_time.c:54
#define AUTH_SYS
Definition: auth.h:403
#define AUTH_SHORT
Definition: auth.h:405
auth_stat
Definition: auth.h:144
@ AUTH_REJECTEDCRED
Definition: auth.h:150
#define AUTH_DES
Definition: auth.h:407
#define AUTH_NULL
Definition: auth.h:402
mutex_t authsvc_lock
Definition: mt_misc.c:47
#define mutex_lock(m)
Definition: reentrant.h:128
#define mutex_unlock(m)
Definition: reentrant.h:129
struct opaque_auth _null_auth
struct opaque_auth xp_verf
Definition: svc.h:121
int flavor
Definition: svc_auth.c:61
enum auth_stat(* handler)(struct svc_req *, struct rpc_msg *)
Definition: svc_auth.c:62
struct authsvc * next
Definition: svc_auth.c:63
Definition: module.h:456
struct opaque_auth rq_cred
Definition: svc.h:137
SVCXPRT * rq_xprt
Definition: svc.h:139
enum auth_stat _svcauth_null(struct svc_req *rqst, struct rpc_msg *msg)
Definition: svc_auth.c:138
static struct authsvc * Auths
Definition: svc_auth.c:65
enum auth_stat _svcauth_des(struct svc_req *rqst, struct rpc_msg *msg)
Definition: svc_auth_des.c:106
enum auth_stat _svcauth_unix(struct svc_req *rqst, struct rpc_msg *msg)
Definition: svc_auth_unix.c:51
enum auth_stat _svcauth_short(struct svc_req *rqst, struct rpc_msg *msg)

Referenced by svc_getreq_common().

◆ svc_auth_reg()

int svc_auth_reg ( int  ,
enum   auth_stat*)(struct svc_req *, struct rpc_msg * 
)