Filename wildcards in include configuration directive
Barry Margolin
barmar at alum.mit.edu
Thu Aug 25 07:56:34 UTC 2005
In article <dej6ia$e22$1 at sf1.isc.org>,
Mark Andrews <Mark_Andrews at isc.org> wrote:
> > In article <deh0tq$2dc6$1 at sf1.isc.org>,
> > Mark Andrews <Mark_Andrews at isc.org> wrote:
> >
> > > > Mark Andrews wrote:
> > > >
> > > > >>Hi All
> > > > >>Is there any reason that the "include" configuration directive does
> > > > >>not
> >
> > > > >>support wildcards in filenames like apache, eg:
> > > > >>include /etc/definitions/*.zdef
> > > > >>
> > > > >>
> > > > >
> > > > > Because no one has written the code to do it. Feel free to
> > > > > write it if you want. It shouldn't be too hard.
> > > > >
> > > > > 1. Document the desired behaviour.
> > > > >
> > > > >
> > > > Or, just refer to the existing documentation. POSIX 1003.2, 3.13.
> > > >
> > > >
> > > >
> > > > - Kevin
> > >
> > > I don't think posix has documented what named should do when
> > > confronted with 'include "/etc/definitions/*.zdef";' in
> > > named.conf. As I said document the desired behaviour.
> >
> > I think the intent was clear. POSIX specifies how wildcards are matched
> > against filenames. What else could he conceivably desire but that the
> > statement would include all the files that match the wildcard, using the
> > matching algorithm of POSIX?
>
> Globing is shell sensitive.
BIND isn't a shell, so that's irrelevant. POSIX has a glob() function,
and it implements the standard wildcard matching, and its specification
should answer all the questions below.
>
> $ ls {config,xx}.[ch]
> ls: {config,xx}.[ch]: No such file or directory
>
> % ls {config,xx}.[ch]
> config.h xx.c
>
> Do they want full globing or just "*"?
>
> Do you need to be able to escape the special characters?
>
> And all this need to be documented in named's documentation.
>
> Without a spec/documentation you don't know when you are done.
>
> > Actually, I would expect that the matching algorithm should match the OS
> > on which BIND is running. So if it's on a Unix system it should use
> > POSIX matching, but on Windows it should use Windows/DOS filename
> > matching.
>
> > --
> > Barry Margolin, barmar at alum.mit.edu
> > Arlington, MA
> > *** PLEASE post questions in newsgroups, not directly to me ***
> >
> >
> --
> Mark Andrews, ISC
> 1 Seymour St., Dundas Valley, NSW 2117, Australia
> PHONE: +61 2 9871 4742 INTERNET: Mark_Andrews at isc.org
--
Barry Margolin, barmar at alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
More information about the bind-users
mailing list