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

rec_control does not recognize the 'include-dir' configuration directive #6536

Closed
kaosdrachen opened this Issue Apr 30, 2018 · 3 comments

Comments

Projects
None yet
3 participants
@kaosdrachen
Contributor

kaosdrachen commented Apr 30, 2018

  • Program: recursor
  • Issue type: Bug report

Short description

While tracking an issue with rec_control, I discovered that the program does not recognize or honor the ''include-dir'' directive in /etc/powerdns/recursor.conf and will therefore fail to load any options that are only set in included files.

Environment

  • Operating system: Debian GNU/Linux 9.4
  • Software version: 4.1.2
  • Software source: PDNS Repository

Steps to reproduce

  1. In recursor.conf, add the statement
    include-dir=/etc/powerdns/recursor.d/
  2. In /etc/powerdns/recursor.d/local.conf, add the statement
socket-dir=/var/run/pdns-recursor
socket-mode=0775
  1. As someone not root but in the pdns group, run
    rec_control version

Expected behaviour

pdns@stheno:~$ rec_control version
4.1.2

Actual behaviour

pdns@stheno:~$ rec_control version
Fatal: Unable to generate local temporary file in directory '/var/run': Permission denied

(It's still looking in the default location of /var/run/ for sockets and tempfile creation)

Other information

I consulted with Habbie on IRC and they confirmed that rec_control doesn't look at include_dir

According to them a quick grep of pdns_control sources indicate it, too, doesn't check for include_dir, but I don't currently have a non-production auth server setup to test.

@Habbie

This comment has been minimized.

Show comment
Hide comment
@Habbie

Habbie Apr 30, 2018

Member

I consulted with Habbie on IRC and they confirmed that rec_control doesn't look at include_dir

From a brief look at the source code - I could have missed something, but @kaosdrachen's debugging on IRC appears to have proven it.

Member

Habbie commented Apr 30, 2018

I consulted with Habbie on IRC and they confirmed that rec_control doesn't look at include_dir

From a brief look at the source code - I could have missed something, but @kaosdrachen's debugging on IRC appears to have proven it.

@kaosdrachen

This comment has been minimized.

Show comment
Hide comment
@kaosdrachen

kaosdrachen Apr 30, 2018

Contributor

I should add that moving the socket-dir= statement to /etc/powerdns/recursor.conf causes rec_control to work as intended, so it's definitely simply failing to include the include-dir files.

Contributor

kaosdrachen commented Apr 30, 2018

I should add that moving the socket-dir= statement to /etc/powerdns/recursor.conf causes rec_control to work as intended, so it's definitely simply failing to include the include-dir files.

@Habbie

This comment has been minimized.

Show comment
Hide comment
@Habbie

Habbie May 1, 2018

Member

According to them a quick grep of pdns_control sources indicate it, too, doesn't check for include_dir, but I don't currently have a non-production auth server setup to test.

pdns_control respects include-dir correctly.

Member

Habbie commented May 1, 2018

According to them a quick grep of pdns_control sources indicate it, too, doesn't check for include_dir, but I don't currently have a non-production auth server setup to test.

pdns_control respects include-dir correctly.

pieterlexis added a commit that referenced this issue May 1, 2018

Merge pull request #6557 from Habbie/rec_control-include-dir
make rec_control respect include-dir; closes #6536

pieterlexis added a commit to pieterlexis/pdns that referenced this issue Aug 20, 2018

make rec_control respect include-dir; closes #6536
(cherry picked from commit 14cd977)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment