New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

slave zone - named-zonecheck fails #56

Closed
msenebald opened this Issue Dec 26, 2013 · 1 comment

Comments

Projects
None yet
2 participants
@msenebald

msenebald commented Dec 26, 2013

Hi,

just tracking down another (maybe) bug.
what i did:

created a slave zone, output is:
zone "xxxxxxxxx.xx" {
type slave;
masters { 10.8.0.1; };
file "/etc/named/zones/slaves/db.xxxxxxxxxxxxx.9.hosts";
};

the named-zonecheck fails with:
"Your zone configuration files contain one or more errors:

usage: named-checkzone [-djqvD] [-c class] [-f inputformat] [-F outputformat] [-t directory] [-w directory] [-k (ignore|warn|fail)] [-n (ignore|warn|fail)] [-m (ignore|warn|fail)] [-r (ignore|warn|fail)] [-i (full|full-sibling|local|local-sibling|none)] [-M (ignore|warn|fail)] [-S (ignore|warn|fail)] [-W (ignore|warn)] [-o filename] zonename filename"

after some digging i found out that the $zone_name variable is empty in fuction namedSyntaxChecks https://github.com/WillyXJ/facileManager/blob/master/server/fm-modules/fmDNS/classes/class_buildconf.php#L1028

the variable $zone_files contains:
Array ( [local] => Array ( [] => /etc/named/zones/slaves/db.xxxxxxxxxxxxx.9.hosts ) )

which then causes the empty $zone_name and the failing named check.
I didnt check the calling functions yet, so didnt find the root cause yet.

@WillyXJ

This comment has been minimized.

Owner

WillyXJ commented Dec 26, 2013

The source of the problem is several lines above that where $zone_files gets populated and no checks are done to ensure it's a master zone instead of a slave. (https://github.com/WillyXJ/facileManager/blob/master/server/fm-modules/fmDNS/classes/class_buildconf.php#L995).

I'll make a fix for 1.0.2. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment