X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=utils%2Frquotad%2Frquota_svc.c;h=81b692845e2da0e6e39524a7238b537ce53ac085;hp=d402f0b2f952f32a73c2e882977adac2418efc75;hb=764e46f5c5fe1a6e376f4cd350424f33afc9e838;hpb=25f30caad17b6379a462d567b242e961082e1485 diff --git a/utils/rquotad/rquota_svc.c b/utils/rquotad/rquota_svc.c index d402f0b..81b6928 100644 --- a/utils/rquotad/rquota_svc.c +++ b/utils/rquotad/rquota_svc.c @@ -20,6 +20,10 @@ */ #include "config.h" +#ifdef HAVE_TCP_WRAPPER +#include "tcpwrapper.h" +#endif + #include #include #include "rquota.h" @@ -59,6 +63,15 @@ static void rquotaprog_1(struct svc_req *rqstp, register SVCXPRT *transp) xdrproc_t xdr_argument, xdr_result; char *(*local)(char *, struct svc_req *); +#ifdef HAVE_TCP_WRAPPER + /* remote host authorization check */ + if (!check_default("rquotad", svc_getcaller(transp), + rqstp->rq_proc, (u_long) 0)) { + svcerr_auth (transp, AUTH_FAILED); + return; + } +#endif + /* * Don't bother authentication for NULLPROC. */