Bug 732312 - named-checkconf: wrong-path resolution in chroot
Summary: named-checkconf: wrong-path resolution in chroot
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: bind
Version: 14
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Adam Tkac
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-08-21 22:40 UTC by Harald Reindl
Modified: 2013-04-30 23:50 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-09-14 12:14:35 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Harald Reindl 2011-08-21 22:40:14 UTC
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
/var/named/chroot/var/named/zones-home-ptr/config.dns

Comment 1 Adam Tkac 2011-09-14 12:14:35 UTC
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 12:26:16 UTC
but the chroot is the default and rkhunter is checking this also (both fedora packages)

Comment 3 Adam Tkac 2011-09-14 12:47:04 UTC
(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 12:51:16 UTC
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.