umdns: add /etc/umdns/ to mount namespace jail
authorDaniel Golle <daniel@makrotopia.org>
Wed, 20 Mar 2024 19:22:46 +0000 (19:22 +0000)
committerDaniel Golle <daniel@makrotopia.org>
Wed, 20 Mar 2024 19:23:50 +0000 (19:23 +0000)
Make sure /etc/umdns/ is accessiable for the umdns process if it
exists and umdns is run with umdns.@umdns[0].jail='1'.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
package/network/services/umdns/files/umdns.init

index 7f25595f2493aa863e158c59de3d2d3461e42e39..e9a2c05e093e3098363e43dc23b6ea1d34259d95 100644 (file)
@@ -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.@umdns[-1].jail)" = 1 ] && procd_add_jail umdns ubus log
+       [ "$(uci get umdns.@umdns[-1].jail)" = 1 ] && {
+               procd_add_jail umdns ubus log
+               [ -d /etc/umdns ] && procd_add_jail_mount "/etc/umdns"
+       }
        procd_close_instance
 }