123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112 |
- #define __FORCE_GLIBC__
- #include <features.h>
- #include <rpc/rpc.h>
- enum auth_stat _svcauth_null();
- enum auth_stat _svcauth_unix();
- enum auth_stat _svcauth_short();
- static struct {
- enum auth_stat (*authenticator) ();
- } svcauthsw[] = {
- {_svcauth_null},
- {_svcauth_unix},
- {_svcauth_short},
- };
- #define AUTH_MAX 2
- enum auth_stat _authenticate(rqst, msg)
- register struct svc_req *rqst;
- struct rpc_msg *msg;
- {
- register int cred_flavor;
- rqst->rq_cred = msg->rm_call.cb_cred;
- rqst->rq_xprt->xp_verf.oa_flavor = _null_auth.oa_flavor;
- rqst->rq_xprt->xp_verf.oa_length = 0;
- cred_flavor = rqst->rq_cred.oa_flavor;
- if ((cred_flavor <= AUTH_MAX) && (cred_flavor >= AUTH_NULL)) {
- return ((*(svcauthsw[cred_flavor].authenticator)) (rqst, msg));
- }
- return (AUTH_REJECTEDCRED);
- }
- enum auth_stat _svcauth_null( )
-
- {
- return (AUTH_OK);
- }
|