NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

misc/50472: rc.d/named ignores rndc.conf



>Number:         50472
>Category:       misc
>Synopsis:       rc.d/named ignores rndc.conf
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    misc-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Nov 25 20:10:00 +0000 2015
>Originator:     Rob
>Release:        7.0_STABLE
>Organization:
>Environment:
7.0_STABLE
>Description:
The /etc/rc.d/named script creates /etc/rndc.key if there isn't one, which then gets moved to /var/chroot/named/ if chroot is enabled.

I believe it should only do that if both rndc.key and rndc.conf are missing.

        if [ ! -e "/etc/rndc.key" ]; then
                echo "Generating rndc.key"
                /usr/sbin/rndc-confgen -a
        fi

>How-To-Repeat:
There's no real issue, other than this warning message:

# rndc status
WARNING: key file (/etc/rndc.key) exists, but using default configuration file (/etc/rndc.conf)
 [...]

>Fix:
***************
*** 63,69 ****
  
  named_precmd()
  {
!       if [ ! -e "/etc/rndc.key" -a ! -e "/etc/rndc.conf" ]; then
                echo "Generating rndc.key"
                /usr/sbin/rndc-confgen -a
        fi
--- 63,69 ----
  
  named_precmd()
  {
!       if [ ! -e "/etc/rndc.key" ]; then
                echo "Generating rndc.key"
                /usr/sbin/rndc-confgen -a
        fi



Home | Main Index | Thread Index | Old Index