X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=utils%2Fmountd%2Fmount_dispatch.c;h=e87831a6969412c2abe450dda8afffaf1ed7f811;hp=cee19810476d1270918934c4e2c826887a89aab6;hb=5591654c71e7e2e5959c8718a7e880516b9081e8;hpb=8b7ad01b14df1e7529b9ba8a1ea17df0d6004ef9 diff --git a/utils/mountd/mount_dispatch.c b/utils/mountd/mount_dispatch.c index cee1981..e87831a 100644 --- a/utils/mountd/mount_dispatch.c +++ b/utils/mountd/mount_dispatch.c @@ -6,6 +6,10 @@ #include "config.h" +#ifdef HAVE_TCP_WRAPPER +#include "tcpwrapper.h" +#endif + #include "mountd.h" #include "rpcmisc.h" @@ -65,6 +69,15 @@ mount_dispatch(struct svc_req *rqstp, SVCXPRT *transp) union mountd_arguments argument; union mountd_results result; +#ifdef HAVE_TCP_WRAPPER + /* remote host authorization check */ + if (!check_default("mountd", svc_getcaller(transp), + rqstp->rq_proc, MOUNTPROG)) { + svcerr_auth (transp, AUTH_FAILED); + return; + } +#endif + rpc_dispatch(rqstp, transp, dtable, number_of(dtable), &argument, &result); }