]> git.decadent.org.uk Git - nfs-utils.git/blobdiff - utils/mountd/mount_dispatch.c
statd: Replace note() with xlog() in rpc.statd
[nfs-utils.git] / utils / mountd / mount_dispatch.c
index e87831a6969412c2abe450dda8afffaf1ed7f811..199fcece4f4682fb51e27dff87e42847b2096a47 100644 (file)
@@ -4,7 +4,9 @@
  * Copyright (C) 1995 Olaf Kirch <okir@monad.swb.de>
  */
 
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
 
 #ifdef HAVE_TCP_WRAPPER
 #include "tcpwrapper.h"
@@ -68,11 +70,12 @@ mount_dispatch(struct svc_req *rqstp, SVCXPRT *transp)
 {
        union mountd_arguments  argument;
        union mountd_results    result;
-
 #ifdef HAVE_TCP_WRAPPER
+       struct sockaddr_in *sin = nfs_getrpccaller_in(transp);
+
        /* remote host authorization check */
-       if (!check_default("mountd", svc_getcaller(transp),
-                          rqstp->rq_proc, MOUNTPROG)) {
+       if (sin->sin_family == AF_INET &&
+           !check_default("mountd", sin, rqstp->rq_proc, MOUNTPROG)) {
                svcerr_auth (transp, AUTH_FAILED);
                return;
        }