named: /var/run/named isn't being created with correct permissions
authorPhilip Prindeville <[email protected]>
Mon, 26 May 2025 03:20:25 +0000 (21:20 -0600)
committerNoah Meyerhans <[email protected]>
Thu, 3 Jul 2025 14:27:02 +0000 (10:27 -0400)
It needs to be group writable or session.key can't be written once
named drops privileges.

Signed-off-by: Philip Prindeville <[email protected]>
(cherry picked from commit b82574b31c240efedcb3f96274982a2703abf440)

net/bind/Makefile
net/bind/files/named.init

index da5b2eab5d19b2dbe2199b1d1b37c62dd7ade0b2..5f21c2fc755dec1bef3330482f66b958720d3593 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=bind
 PKG_VERSION:=9.18.37
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 USERID:=bind=57:bind=57
 
 PKG_MAINTAINER:=Noah Meyerhans <[email protected]>
index 288d8f88545e6176f83f9871c1635ffbcf3789d7..12df71efe9e2dba00789716a3c888fbcf0ace564 100644 (file)
@@ -13,6 +13,7 @@ named_options_file=/etc/bind/named-rndc.conf
 rndc_conf_file=/etc/bind/rndc.conf
 pid_file=/var/run/named/named.pid
 
+rundir=$(dirname $pid_file)
 logdir=/var/log/named/
 cachedir=/var/cache/bind
 libdir=/var/lib/bind
@@ -21,7 +22,7 @@ dyndir=/tmp/bind
 conf_local_file=$dyndir/named.conf.local
 
 fix_perms() {
-    for dir in $libdir $logdir $cachedir $dyndir; do
+    for dir in $rundir $libdir $logdir $cachedir $dyndir; do
        test -e "$dir" || {
             mkdir -p "$dir"
             chgrp bind "$dir"