From f88b618fe2c18f2c32ade5833e9f35040413a1a0 Mon Sep 17 00:00:00 2001 From: Philip Prindeville Date: Sun, 25 May 2025 21:20:25 -0600 Subject: [PATCH] named: /var/run/named isn't being created with correct permissions It needs to be group writable or session.key can't be written once named drops privileges. Signed-off-by: Philip Prindeville (cherry picked from commit b82574b31c240efedcb3f96274982a2703abf440) --- net/bind/Makefile | 2 +- net/bind/files/named.init | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/net/bind/Makefile b/net/bind/Makefile index da5b2eab5d..5f21c2fc75 100644 --- a/net/bind/Makefile +++ b/net/bind/Makefile @@ -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 diff --git a/net/bind/files/named.init b/net/bind/files/named.init index 288d8f8854..12df71efe9 100644 --- a/net/bind/files/named.init +++ b/net/bind/files/named.init @@ -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" -- 2.30.2