]> git.decadent.org.uk Git - nfs-utils.git/blobdiff - utils/rquotad/rquota_svc.c
2000-08-25 H.J. Lu <hjl@lucon.org>
[nfs-utils.git] / utils / rquotad / rquota_svc.c
index d402f0b2f952f32a73c2e882977adac2418efc75..81b692845e2da0e6e39524a7238b537ce53ac085 100644 (file)
  */
 #include "config.h"
 
+#ifdef HAVE_TCP_WRAPPER
+#include "tcpwrapper.h"
+#endif
+
 #include <unistd.h>
 #include <rpc/rpc.h>
 #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.
     */