CRLF as line terminator in zone file

Joe Abley jabley at patho.gen.nz
Tue Oct 5 05:05:31 UTC 1999


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


More information about the bind-users mailing list