#define LOCKD_BUFSIZE (1024 + NLMSVC_XDRSIZE)
#define ALLOWED_SIGS (sigmask(SIGKILL))
-static struct svc_program nlmsvc_program;
+extern struct svc_program nlmsvc_program;
struct nlmsvc_binding * nlmsvc_ops;
EXPORT_SYMBOL(nlmsvc_ops);
return 0; \
}
-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;
-}
-
-
param_set_min_max(port, int, simple_strtol, 0, 65535)
param_set_min_max(grace_period, unsigned long, simple_strtoul,
nlm_grace_period_min, nlm_grace_period_max)
static struct svc_stat nlmsvc_stats;
#define NLM_NRVERS (sizeof(nlmsvc_version)/sizeof(nlmsvc_version[0]))
-static struct svc_program nlmsvc_program = {
- .pg_prog = NLM_PROGRAM, /* program number */
- .pg_nvers = NLM_NRVERS, /* number of entries in nlmsvc_version */
- .pg_vers = nlmsvc_version, /* version table */
- .pg_name = "lockd", /* service name */
- .pg_class = "nfsd", /* share authentication with nfsd */
- .pg_stats = &nlmsvc_stats, /* stats table */
- .pg_authenticate = &lockd_authenticate /* export authentication */
+struct svc_program nlmsvc_program = {
+ .pg_prog = NLM_PROGRAM, /* program number */
+ .pg_nvers = NLM_NRVERS, /* number of entries in nlmsvc_version */
+ .pg_vers = nlmsvc_version, /* version table */
+ .pg_name = "lockd", /* service name */
+ .pg_class = "nfsd", /* share authentication with nfsd */
+ .pg_stats = &nlmsvc_stats, /* stats table */
};