* [PATCH 0/1] bind: fix daemon startup failure on sysvinit
@ 2017-11-27 8:07 Chen Qi
2017-11-27 8:07 ` [PATCH 1/1] " Chen Qi
0 siblings, 1 reply; 3+ messages in thread
From: Chen Qi @ 2017-11-27 8:07 UTC (permalink / raw)
To: openembedded-core
The following changes since commit 72867393fe2004ab9f0ee23eb09a975c82938b9e:
runqemu: Also specialcase resolution of '.' to the file's location (2017-11-21 17:58:41 +0000)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib ChenQi/bind-daemon-sysvinit
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=ChenQi/bind-daemon-sysvinit
Chen Qi (1):
bind: fix daemon startup failure on sysvinit
...owner-of-rndc.key-to-correctly-start-daem.patch | 32 ++++++++++++++++++++++
meta/recipes-connectivity/bind/bind_9.10.6.bb | 1 +
2 files changed, 33 insertions(+)
create mode 100644 meta/recipes-connectivity/bind/bind/0001-init.d-fix-owner-of-rndc.key-to-correctly-start-daem.patch
--
1.9.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/1] bind: fix daemon startup failure on sysvinit
2017-11-27 8:07 [PATCH 0/1] bind: fix daemon startup failure on sysvinit Chen Qi
@ 2017-11-27 8:07 ` Chen Qi
2017-12-19 1:34 ` ChenQi
0 siblings, 1 reply; 3+ messages in thread
From: Chen Qi @ 2017-11-27 8:07 UTC (permalink / raw)
To: openembedded-core
When starting the bind daemon on sysvinit based system, we are
meeting the following error and the daemon fails to start.
/etc/bind/rndc.key: permission denied
Fix this problem by chaning the ownship of rndc.key to root:bind.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
...owner-of-rndc.key-to-correctly-start-daem.patch | 32 ++++++++++++++++++++++
meta/recipes-connectivity/bind/bind_9.10.6.bb | 1 +
2 files changed, 33 insertions(+)
create mode 100644 meta/recipes-connectivity/bind/bind/0001-init.d-fix-owner-of-rndc.key-to-correctly-start-daem.patch
diff --git a/meta/recipes-connectivity/bind/bind/0001-init.d-fix-owner-of-rndc.key-to-correctly-start-daem.patch b/meta/recipes-connectivity/bind/bind/0001-init.d-fix-owner-of-rndc.key-to-correctly-start-daem.patch
new file mode 100644
index 0000000..b3ec013
--- /dev/null
+++ b/meta/recipes-connectivity/bind/bind/0001-init.d-fix-owner-of-rndc.key-to-correctly-start-daem.patch
@@ -0,0 +1,32 @@
+Subject: init.d: fix owner of rndc.key to correctly start daemon
+
+When starting with '-u bind' option, which is a common practice for
+most distros, we would meet the following error and the daemon would
+not be started up correctly.
+
+ /etc/bind/rndc.key: permission denied
+
+Fix this problem by changing the ownership of rndc.key to root:bind.
+
+Upstream-Status: Pending
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ init.d | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/init.d b/init.d
+index b2eec60..d6860c7 100644
+--- a/init.d
++++ b/init.d
+@@ -57,6 +57,7 @@ case "$1" in
+ modprobe capability >/dev/null 2>&1 || true
+ if [ ! -f /etc/bind/rndc.key ]; then
+ /usr/sbin/rndc-confgen -a -b 512 -r /dev/urandom
++ chown root:bind /etc/bind/rndc.key
+ chmod 0640 /etc/bind/rndc.key
+ fi
+ if [ -f /var/run/named/named.pid ]; then
+--
+2.11.0
+
diff --git a/meta/recipes-connectivity/bind/bind_9.10.6.bb b/meta/recipes-connectivity/bind/bind_9.10.6.bb
index 8b8835b..7eaaf9d 100644
--- a/meta/recipes-connectivity/bind/bind_9.10.6.bb
+++ b/meta/recipes-connectivity/bind/bind_9.10.6.bb
@@ -21,6 +21,7 @@ SRC_URI = "https://ftp.isc.org/isc/bind9/${PV}/${BPN}-${PV}.tar.gz \
file://0001-gen.c-extend-DIRNAMESIZE-from-256-to-512.patch \
file://0001-lib-dns-gen.c-fix-too-long-error.patch \
file://use-python3-and-fix-install-lib-path.patch \
+ file://0001-init.d-fix-owner-of-rndc.key-to-correctly-start-daem.patch \
"
SRC_URI[md5sum] = "84e663284b17aee0df1ce6f248b137d7"
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] bind: fix daemon startup failure on sysvinit
2017-11-27 8:07 ` [PATCH 1/1] " Chen Qi
@ 2017-12-19 1:34 ` ChenQi
0 siblings, 0 replies; 3+ messages in thread
From: ChenQi @ 2017-12-19 1:34 UTC (permalink / raw)
To: openembedded-core
ping
Could someone help review this patch?
Best Regards,
Chen Qi
On 11/27/2017 04:07 PM, Chen Qi wrote:
> When starting the bind daemon on sysvinit based system, we are
> meeting the following error and the daemon fails to start.
>
> /etc/bind/rndc.key: permission denied
>
> Fix this problem by chaning the ownship of rndc.key to root:bind.
>
> Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
> ---
> ...owner-of-rndc.key-to-correctly-start-daem.patch | 32 ++++++++++++++++++++++
> meta/recipes-connectivity/bind/bind_9.10.6.bb | 1 +
> 2 files changed, 33 insertions(+)
> create mode 100644 meta/recipes-connectivity/bind/bind/0001-init.d-fix-owner-of-rndc.key-to-correctly-start-daem.patch
>
> diff --git a/meta/recipes-connectivity/bind/bind/0001-init.d-fix-owner-of-rndc.key-to-correctly-start-daem.patch b/meta/recipes-connectivity/bind/bind/0001-init.d-fix-owner-of-rndc.key-to-correctly-start-daem.patch
> new file mode 100644
> index 0000000..b3ec013
> --- /dev/null
> +++ b/meta/recipes-connectivity/bind/bind/0001-init.d-fix-owner-of-rndc.key-to-correctly-start-daem.patch
> @@ -0,0 +1,32 @@
> +Subject: init.d: fix owner of rndc.key to correctly start daemon
> +
> +When starting with '-u bind' option, which is a common practice for
> +most distros, we would meet the following error and the daemon would
> +not be started up correctly.
> +
> + /etc/bind/rndc.key: permission denied
> +
> +Fix this problem by changing the ownership of rndc.key to root:bind.
> +
> +Upstream-Status: Pending
> +
> +Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
> +---
> + init.d | 1 +
> + 1 file changed, 1 insertion(+)
> +
> +diff --git a/init.d b/init.d
> +index b2eec60..d6860c7 100644
> +--- a/init.d
> ++++ b/init.d
> +@@ -57,6 +57,7 @@ case "$1" in
> + modprobe capability >/dev/null 2>&1 || true
> + if [ ! -f /etc/bind/rndc.key ]; then
> + /usr/sbin/rndc-confgen -a -b 512 -r /dev/urandom
> ++ chown root:bind /etc/bind/rndc.key
> + chmod 0640 /etc/bind/rndc.key
> + fi
> + if [ -f /var/run/named/named.pid ]; then
> +--
> +2.11.0
> +
> diff --git a/meta/recipes-connectivity/bind/bind_9.10.6.bb b/meta/recipes-connectivity/bind/bind_9.10.6.bb
> index 8b8835b..7eaaf9d 100644
> --- a/meta/recipes-connectivity/bind/bind_9.10.6.bb
> +++ b/meta/recipes-connectivity/bind/bind_9.10.6.bb
> @@ -21,6 +21,7 @@ SRC_URI = "https://ftp.isc.org/isc/bind9/${PV}/${BPN}-${PV}.tar.gz \
> file://0001-gen.c-extend-DIRNAMESIZE-from-256-to-512.patch \
> file://0001-lib-dns-gen.c-fix-too-long-error.patch \
> file://use-python3-and-fix-install-lib-path.patch \
> + file://0001-init.d-fix-owner-of-rndc.key-to-correctly-start-daem.patch \
> "
>
> SRC_URI[md5sum] = "84e663284b17aee0df1ce6f248b137d7"
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-12-19 1:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-27 8:07 [PATCH 0/1] bind: fix daemon startup failure on sysvinit Chen Qi
2017-11-27 8:07 ` [PATCH 1/1] " Chen Qi
2017-12-19 1:34 ` ChenQi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox