Linux NFS development
 help / color / mirror / Atom feed
From: Steve Dickson <SteveD@redhat.com>
To: Chuck Lever <chuck.lever@oracle.com>
Cc: Linux NFS Mailing list <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH 0/3] nfs-utils: Enabling TCP wrappers
Date: Thu, 18 Dec 2008 14:59:29 -0500	[thread overview]
Message-ID: <494AABA1.4070006@RedHat.com> (raw)
In-Reply-To: <1819C671-5353-45B4-A814-98B1B2A4BEB1@oracle.com>

Chuck Lever wrote:
> 
> A general comment:  This code will need support for IPv6 addresses.
> 
> Until it has it, perhaps we should add some logic to configure.ac that
> prevents the use of tcpwrappers when --enable-ipv6 is in effect.
The following patch does address this concern....

comments?

steved.


commit 5526bb225c745d169c070d392402fc1a569f1d15
Author: Steve Dickson <steved@redhat.com>
Date:   Thu Dec 18 14:57:52 2008 -0500

    Skip the host access check when IPv6 is enabled and its an IPv6 address.
    
    Signed-off-by: Steve Dickson <steved@redhat.com>

diff --git a/utils/mountd/mount_dispatch.c b/utils/mountd/mount_dispatch.c
index f00c0c5..8aa1955 100644
--- a/utils/mountd/mount_dispatch.c
+++ b/utils/mountd/mount_dispatch.c
@@ -12,6 +12,8 @@
 #include "tcpwrapper.h"
 #endif
 
+#include <sys/syslog.h>
+
 #include "mountd.h"
 #include "rpcmisc.h"
 
@@ -72,12 +74,29 @@ mount_dispatch(struct svc_req *rqstp, SVCXPRT *transp)
 	union mountd_results	result;
 
 #ifdef HAVE_TCP_WRAPPER
+#ifdef IPV6_SUPPORTED
+	static int once = 0;
+
+	if (svc_getcaller(transp)->sin_family != AF_INET) {
+		if (!once) {
+			syslog(LOG_WARNING, 
+				"No IPv6 support in Access Control Library (TCP Wrappers)"); 
+			once++;
+		}
+		goto skipcheck;
+	}
+#endif
 	/* remote host authorization check */
 	if (!check_default("mountd", svc_getcaller(transp),
 			   rqstp->rq_proc, MOUNTPROG)) {
 		svcerr_auth (transp, AUTH_FAILED);
 		return;
 	}
+
+#ifdef IPV6_SUPPORTED
+skipcheck:
+#endif
+
 #endif
 
 	rpc_dispatch(rqstp, transp, dtable, number_of(dtable),

  parent reply	other threads:[~2008-12-18 20:03 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-15 16:54 [PATCH 0/3] nfs-utils: Enabling TCP wrappers Steve Dickson
     [not found] ` <49468BC7.2000907-AfCzQyP5zfLQT0dZR+AlfA@public.gmane.org>
2008-12-15 16:58   ` [PATCH 1/3] " Steve Dickson
2008-12-15 17:10   ` [PATCH 2/3] " Steve Dickson
2008-12-15 17:11   ` [PATCH 3/3] " Steve Dickson
2008-12-15 17:26   ` [PATCH 0/3] " Chuck Lever
2008-12-15 17:56     ` Steve Dickson
2008-12-18 19:59     ` Steve Dickson [this message]
     [not found]       ` <494AABA1.4070006-AfCzQyP5zfLQT0dZR+AlfA@public.gmane.org>
2008-12-18 20:23         ` Chuck Lever
2008-12-18 20:49           ` Steve Dickson
     [not found]             ` <494AB74E.3040403-AfCzQyP5zfLQT0dZR+AlfA@public.gmane.org>
2008-12-18 20:56               ` Chuck Lever
2008-12-18 21:21                 ` Steve Dickson
2008-12-19 17:00           ` Steve Dickson
2008-12-20 12:35   ` Steve Dickson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=494AABA1.4070006@RedHat.com \
    --to=steved@redhat.com \
    --cc=chuck.lever@oracle.com \
    --cc=linux-nfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox