* * * * *
Binding BIND
I downloaded BIND 8.2.3 [1] and in poking around the source code, found the
offending code [2] that prevented the parsing of DNS zone files in a certain
format. It was a one line modification to fix the problem:
-----[ C ]-----
bind/src/bin/named/db_load.c:1594
#ifndef BIND_UPDATE
static
#endif
int
getnonblank(FILE *fp, const char *src, int multiline) {
int c;
**multiline = 1; /* hack to fix --spc */**
while ((c = getc(fp)) != EOF) {
if (isspace(c)) {
if (c == '\n') {
if (multiline)
lineno++;
else
goto eol;
}
continue;
}
if (c == ';') {
while ((c = getc(fp)) != EOF && c != '\n')
;
if (c == '\n') {
if (multiline)
lineno++;
else
goto eol;
}
continue;
}
return (c);
}
ns_info(ns_log_db, "%s:%d: unexpected EOF", src, lineno);
return (EOF);
eol:
ns_error(ns_log_db, "%s:%d: unexpected end of line", src, lineno);
/* don't ungetc(c, fp); as the caller will do this. */
return(c);
}
-----[ END OF LINE ]-----
Sigh.
[1]
http://www.isc.org/products/BIND/bind8.html
[2]
gopher://gopher.conman.org/0Phlog:2001/01/30.3
Email author at
[email protected]