-static inline int is_callback(u32 proc)
-{
- return proc == NLMPROC_GRANTED
- || proc == NLMPROC_GRANTED_MSG
- || proc == NLMPROC_TEST_RES
- || proc == NLMPROC_LOCK_RES
- || proc == NLMPROC_CANCEL_RES
- || proc == NLMPROC_UNLOCK_RES
- || proc == NLMPROC_NSM_NOTIFY;
-}
-
-
-static int lockd_authenticate(struct svc_rqst *rqstp)
-{
- rqstp->rq_client = NULL;
- switch (rqstp->rq_authop->flavour) {
- case RPC_AUTH_NULL:
- case RPC_AUTH_UNIX:
- if (rqstp->rq_proc == 0)
- return SVC_OK;
- if (is_callback(rqstp->rq_proc)) {
- /* Leave it to individual procedures to
- * call nlmsvc_lookup_host(rqstp)
- */
- return SVC_OK;
- }
- return svc_set_client(rqstp);
- }
- return SVC_DENIED;
-}
-
-