linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Wildcards matching ".": exports bug or just documentation bug?
@ 2002-10-04 11:57 Stephen C. Tweedie
  2002-11-13 13:55 ` Stephen C. Tweedie
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen C. Tweedie @ 2002-10-04 11:57 UTC (permalink / raw)
  To: nfs; +Cc: Stephen Tweedie, linux-fsdevel

Hi,

mountd treats wildcards in hostnames in the exports file as matching
anything, including ".".

However, the exports man page explicitly states that "*" and "?" do not
match ".":

    Machine names may contain the wildcard characters * and ?.  This can
    be used to make the exports file more compact; for instance,
    *.cs.foo.edu matches all hosts in the domain cs.foo.edu. However,
    these wildcard characters do not match the dots in a domain name, so
    the above pattern does not include hosts such as a.b.cs.foo.edu.

So, which is right, the actual behaviour or the documented behaviour?
I'd tend to lean towards the former.

--Stephen

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Wildcards matching ".": exports bug or just documentation bug?
  2002-10-04 11:57 Wildcards matching ".": exports bug or just documentation bug? Stephen C. Tweedie
@ 2002-11-13 13:55 ` Stephen C. Tweedie
  2002-11-13 22:13   ` Neil Brown
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen C. Tweedie @ 2002-11-13 13:55 UTC (permalink / raw)
  To: nfs, neilb, trond.myklebust; +Cc: Stephen Tweedie, linux-fsdevel

Hi,

On Fri, Oct 04, 2002 at 12:57:04PM +0100, Stephen C. Tweedie wrote:
 
> mountd treats wildcards in hostnames in the exports file as matching
> anything, including ".".
> However, the exports man page explicitly states that "*" and "?" do not
> match ".":
 
> So, which is right, the actual behaviour or the documented behaviour?
> I'd tend to lean towards the former.

Ping?  This is a pretty serious discrepancy between the documented and
implemented behaviour.  The documentation *explicitly* states that

	*.com

won't match foo.bar.com, but the implentation matches this just fine.
Given that the documented behaviour doesn't actually give you a way to
match an export for all arbitrarily-deep subdomains underneath a
domain, I'd think matching subdomains of all levels with "*" makes
more sense than matching only a single level, so it's the
documentation that needs to be updated.

--Stephen

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Wildcards matching ".": exports bug or just documentation bug?
  2002-11-13 13:55 ` Stephen C. Tweedie
@ 2002-11-13 22:13   ` Neil Brown
  0 siblings, 0 replies; 3+ messages in thread
From: Neil Brown @ 2002-11-13 22:13 UTC (permalink / raw)
  To: Stephen C. Tweedie; +Cc: nfs, trond.myklebust, linux-fsdevel

On Wednesday November 13, sct@redhat.com wrote:
> Hi,
> 
> On Fri, Oct 04, 2002 at 12:57:04PM +0100, Stephen C. Tweedie wrote:
>  
> > mountd treats wildcards in hostnames in the exports file as matching
> > anything, including ".".
> > However, the exports man page explicitly states that "*" and "?" do not
> > match ".":
>  
> > So, which is right, the actual behaviour or the documented behaviour?
> > I'd tend to lean towards the former.
> 
> Ping?  This is a pretty serious discrepancy between the documented and
> implemented behaviour.  The documentation *explicitly* states that
> 
> 	*.com
> 
> won't match foo.bar.com, but the implentation matches this just fine.
> Given that the documented behaviour doesn't actually give you a way to
> match an export for all arbitrarily-deep subdomains underneath a
> domain, I'd think matching subdomains of all levels with "*" makes
> more sense than matching only a single level, so it's the
> documentation that needs to be updated.

Sorry for not responding the first time...

I completely agree with your analysis.

Does the following make the situation suitable clear?  If so I will
commit it.

NeilBrown


Index: utils/exportfs/exports.man
===================================================================
RCS file: /cvsroot/nfs/nfs-utils/utils/exportfs/exports.man,v
retrieving revision 1.9
diff -u -r1.9 exports.man
--- utils/exportfs/exports.man	17 Jan 2002 00:04:25 -0000	1.9
+++ utils/exportfs/exports.man	13 Nov 2002 22:11:58 -0000
@@ -45,9 +45,10 @@
 .IP "wildcards
 Machine names may contain the wildcard characters \fI*\fR and \fI?\fR.
 This can be used to make the \fIexports\fR file more compact; for instance,
-\fI*.cs.foo.edu\fR matches all hosts in the domain \fIcs.foo.edu\fR. However,
-these wildcard characters do not match the dots in a domain name, so the
-above pattern does not include hosts such as \fIa.b.cs.foo.edu\fR.
+\fI*.cs.foo.edu\fR matches all hosts in the domain
+\fIcs.foo.edu\fR.  As these characters also match the dots in a domain
+name, the given pattern will also match all hosts within any subdomain
+of \fIcs.foo.edu\fR.
 .IP "IP networks
 You can also export directories to all hosts on an IP (sub-) network
 simultaneously. This is done by specifying an IP address and netmask pair

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-11-13 22:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-04 11:57 Wildcards matching ".": exports bug or just documentation bug? Stephen C. Tweedie
2002-11-13 13:55 ` Stephen C. Tweedie
2002-11-13 22:13   ` Neil Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).