[openwrt/openwrt] umdns: add /etc/umdns/ to mount namespace jail
LEDE Commits
lede-commits at lists.infradead.org
Wed Mar 20 12:24:11 PDT 2024
dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/330d67ecc0121bc83f1b1a616e92aacd4760b499
commit 330d67ecc0121bc83f1b1a616e92aacd4760b499
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Wed Mar 20 19:22:46 2024 +0000
umdns: add /etc/umdns/ to mount namespace jail
Make sure /etc/umdns/ is accessiable for the umdns process if it
exists and umdns is run with umdns. at umdns[0].jail='1'.
Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
package/network/services/umdns/files/umdns.init | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/package/network/services/umdns/files/umdns.init b/package/network/services/umdns/files/umdns.init
index 7f25595f24..e9a2c05e09 100644
--- a/package/network/services/umdns/files/umdns.init
+++ b/package/network/services/umdns/files/umdns.init
@@ -42,7 +42,10 @@ start_service() {
done
procd_add_raw_trigger "instance.update" 5000 "/bin/ubus" "call" "umdns" "reload"
procd_close_trigger
- [ "$(uci -q get umdns. at umdns[-1].jail)" = 1 ] && procd_add_jail umdns ubus log
+ [ "$(uci get umdns. at umdns[-1].jail)" = 1 ] && {
+ procd_add_jail umdns ubus log
+ [ -d /etc/umdns ] && procd_add_jail_mount "/etc/umdns"
+ }
procd_close_instance
}
More information about the lede-commits
mailing list