summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/bind/bind-9.18.16/init.d-add-support-for-read-only-rootfs.patch
diff options
context:
space:
mode:
authorSiddharth Doshi <sdoshi@mvista.com>2023-06-27 12:02:00 +0530
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-06-28 07:56:33 +0100
commit0745cb1cb3d480829ce81645f89d10b37e91e063 (patch)
tree8f5ec2f5774298ec4e75f87c4e47538f56000816 /meta/recipes-connectivity/bind/bind-9.18.16/init.d-add-support-for-read-only-rootfs.patch
parentc14fb8602e1d29cef49a4a39e3946692378f55f6 (diff)
downloadpoky-0745cb1cb3d480829ce81645f89d10b37e91e063.tar.gz
bind: Upgrade 9.18.15 -> 9.18.16
- Remove configure options no longer supported online. Changelog: ========= [security] A query that prioritizes stale data over lookup triggers a fetch to refresh the stale data in cache. If the fetch is aborted for exceeding the recursion quota, it was possible for 'named' to enter an infinite callback loop and crash due to stack overflow. This has been fixed. (CVE-2023-2911) [GL #4089] [security] Improve the overmem cleaning process to prevent the cache going over the configured limit. (CVE-2023-2828) [GL #4055] [performance] Reduce memory consumption by allocating properly sized send buffers for stream-based transports. [GL #4038] [bug] Fix a 'clients-per-query' miscalculation bug. When the 'stale-answer-enable' options was enabled and the 'stale-answer-client-timeout' option was enabled and larger than 0, named was taking two places from the 'clients-per-query' limit for each client and was failing to gradually auto-tune its value, as configured. [GL #4074] [func] Add "ClientQuota" statistics channel counter, which indicates the number of the resolver's spilled queries due to reaching the clients per query quota. [GL !7978] [bug] Fix a serve-stale bug where a delegation from cache could be returned to the client. [GL #3950] [cleanup] Remove configure checks for epoll, kqueue and /dev/poll. [GL #4098] [func] The "tkey-dhkey" option has been deprecated; a warning will be logged when it is used. In a future release, Diffie-Hellman TKEY mode will be removed. [GL #3905] [bug] The session key object could be incorrectly added to multiple different views' keyrings. [GL #4079] [bug] Fix an interfacemgr use-after-free error in zoneconf.c:isself(). [GL #3765] [test] Add support for using pytest & pytest-xdist to execute the system test suite. [GL #3978] [bug] BIND could get stuck on reconfiguration when a 'listen' statement for HTTP is removed from the configuration. That has been fixed. [GL #4071] [bug] Properly process extra "nameserver" lines in resolv.conf otherwise the next line is not properly processed. [GL #4066] [bug] named could crash when deleting inline-signing zones with "rndc delzone". [GL #4054] [bug] Fix a logic error in dighost.c which could call the dighost_shutdown() callback twice and cause problems if the callback function was not idempotent. [GL #4039] (From OE-Core rev: 77d2fa5ac1f394fba2b8e24f2b6ded6ea6b691b4) Signed-off-by: Siddharth Doshi <sdoshi@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-connectivity/bind/bind-9.18.16/init.d-add-support-for-read-only-rootfs.patch')
-rw-r--r--meta/recipes-connectivity/bind/bind-9.18.16/init.d-add-support-for-read-only-rootfs.patch65
1 files changed, 65 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/bind/bind-9.18.16/init.d-add-support-for-read-only-rootfs.patch b/meta/recipes-connectivity/bind/bind-9.18.16/init.d-add-support-for-read-only-rootfs.patch
new file mode 100644
index 0000000000..11db95ede1
--- /dev/null
+++ b/meta/recipes-connectivity/bind/bind-9.18.16/init.d-add-support-for-read-only-rootfs.patch
@@ -0,0 +1,65 @@
1Subject: init.d: add support for read-only rootfs
2
3Upstream-Status: Inappropriate [oe specific]
4
5Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
6---
7 init.d | 40 ++++++++++++++++++++++++++++++++++++++++
8 1 file changed, 40 insertions(+)
9
10diff --git a/init.d b/init.d
11index 0111ed4..24677c8 100644
12--- a/init.d
13+++ b/init.d
14@@ -6,8 +6,48 @@ PATH=/sbin:/bin:/usr/sbin:/usr/bin
15 # Don't modify this line, change or create /etc/default/bind9.
16 OPTIONS=""
17
18+test -f /etc/default/rcS && . /etc/default/rcS
19 test -f /etc/default/bind9 && . /etc/default/bind9
20
21+# This function is here because it's possible that /var and / are on different partitions.
22+is_on_read_only_partition () {
23+ DIRECTORY=$1
24+ dir=`readlink -f $DIRECTORY`
25+ while true; do
26+ if [ ! -d "$dir" ]; then
27+ echo "ERROR: $dir is not a directory"
28+ exit 1
29+ else
30+ for flag in `awk -v dir=$dir '{ if ($2 == dir) { print "FOUND"; split($4,FLAGS,",") } }; \
31+ END { for (f in FLAGS) print FLAGS[f] }' < /proc/mounts`; do
32+ [ "$flag" = "FOUND" ] && partition="read-write"
33+ [ "$flag" = "ro" ] && { partition="read-only"; break; }
34+ done
35+ if [ "$dir" = "/" -o -n "$partition" ]; then
36+ break
37+ else
38+ dir=`dirname $dir`
39+ fi
40+ fi
41+ done
42+ [ "$partition" = "read-only" ] && echo "yes" || echo "no"
43+}
44+
45+bind_mount () {
46+ olddir=$1
47+ newdir=$2
48+ mkdir -p $olddir
49+ cp -a $newdir/* $olddir
50+ mount --bind $olddir $newdir
51+}
52+
53+# Deal with read-only rootfs
54+if [ "$ROOTFS_READ_ONLY" = "yes" ]; then
55+ [ "$VERBOSE" != "no" ] && echo "WARN: start bind service in read-only rootfs"
56+ [ `is_on_read_only_partition /etc/bind` = "yes" ] && bind_mount /var/volatile/bind/etc /etc/bind
57+ [ `is_on_read_only_partition /var/named` = "yes" ] && bind_mount /var/volatile/bind/named /var/named
58+fi
59+
60 test -x /usr/sbin/rndc || exit 0
61
62 case "$1" in
63--
641.7.9.5
65