CRLF as line terminator in zone file

Edmund c990077 at hk.china.com
Tue Oct 5 09:51:12 UTC 1999


Why all the troubles ?  If I haven't forgotten, 'samba' might have command to

perform a dos to unix text file copy and conversion.

Marc Lampo wrote:

> Hello,
>
> not particularly a "bind" solution, but would it be an option to get rid
> of the
> '\r' right after the transfert phase ?
>
> for file in --downloaded-files--
> do
>         sed '/.$/s///' $file >/tmp/$$ && mv /tmp/$$ $file
> done
>
> Sure, perl could get the job done as well.
>
> Hope this helps,
>
> Marc Lampo
>
> Joe Abley wrote:
>
> > Hi,
> >
> > I have a client who has previously been running NT ports of bind 4.9.
> > In the absense of a bind 8 port for NT, he has just run up a FreeBSD
> > 3.3 box with bind 8.2.1.
> >
> > His zone files (around 5000 of them) are generated from a database on
> > an NT machine, and are stored in a directory on the FreeBSD box which
> > is made available to NT using samba 2.0.5a.
> >
> > This is all fine and dandy, except that this method of zone file
> > generation results in files with CRLF (\r\n) line terminations rather
> > than simply LF (\n). This confuses the zone file parser in
> > src/bin/named/db_load.c.
> >
> > Changing the way that the zone files are produced is a pain for various
> > NT reasons :) My stop-gap solution was to patch db_load.c, such
> > that a '\r' read from a zone file is treated the same as a ' ' or
> > a '\t'.
> >
> > Has anybody else experienced this? Is there a well-defined solution
> > to this problem already?
> >
> > If not, I will nice-up the patch (so that it's disabled by default
> > and activated by an option). Would anybody be interested in testing
> > this?
> >
> > [I don't _think_ this is an apalling newbie FAQ, since I can't find
> > any reference to "CRLF" in the archives. Apologies if I'm mistaken :)]
> >
> > Joe
>
> -- --
> Security Engineer for C-CURE CBVA, Belgium
> Guest teacher of Client/Server Programming @ AT Computing (Dutch only)
> Opionions are strictly personal and do not commit either company



More information about the bind-users mailing list