Bug 732312 - named-checkconf: wrong-path resolution in chroot
named-checkconf: wrong-path resolution in chroot
Product: Fedora
Classification: Fedora
Component: bind (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Adam Tkac
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2011-08-21 18:40 EDT by Harald Reindl
Modified: 2013-04-30 19:50 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2011-09-14 08:14:35 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Harald Reindl 2011-08-21 18:40:14 EDT
running bind-chroot the config-check does not recognize that  directory "/var/named"; starts physically under /var/named/chroot/ and so include "zones-home-ptr/config.dns"; is correct because if you use the real fs-path bind would not start


[root@ns2:~]$ named-checkconf 
/etc/named.conf:174: open: zones-home-ptr/config.dns: file not found

[root@ns2:~]$ locate config.dns
Comment 1 Adam Tkac 2011-09-14 08:14:35 EDT
You have to pass the "-t <rootdir>" argument to named-checkconf:

`man 8 named-checkconf` says:
-t directory
    Chroot to directory so that include directives in the configuration file are processed as if run by a similarly chrooted named.

After that everything should work as expected. Closing.
Comment 2 Harald Reindl 2011-09-14 08:26:16 EDT
but the chroot is the default and rkhunter is checking this also (both fedora packages)
Comment 3 Adam Tkac 2011-09-14 08:47:04 EDT
(In reply to comment #2)
> but the chroot is the default and rkhunter is checking this also (both fedora
> packages)

Right you are. However I cannot change default behaviour of named-checkconf because it will be too big divergence from upstream.

Another possible solution is to re-add the "checkconfig" target to the initscript to F14 (it is already present in F15 initscript). The initscript can automatically add the -t option to the named-checkconf so everything is OK.

If you want the "checkconfig" target in the F14, please reopen this bug and I will add it.
Comment 4 Harald Reindl 2011-09-14 08:51:16 EDT
i think this would make sense because it is odd that rkhunter warns about inconsistent named-configuration

Note You need to log in before you can comment on or make changes to this bug.