X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=fs%2Flockd%2Fsvc.c;h=b499701aaeaacca47bb94b21a7e7520a52e5c919;hb=f1227cd3e0e73c48b93368800aa89f4341103a00;hp=70ffea1c36b93897c54bd07ae2b448719ffedaeb;hpb=340e2b1a4c74f653454348914c408420d5d3c28a;p=linux-2.6.git diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c index 70ffea1c3..b499701aa 100644 --- a/fs/lockd/svc.c +++ b/fs/lockd/svc.c @@ -38,7 +38,7 @@ #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); @@ -418,38 +418,6 @@ static int param_set_##name(const char *val, struct kernel_param *kp) \ 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) @@ -523,12 +491,11 @@ static struct svc_version * nlmsvc_version[] = { 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 */ };