From ea42d87528432eabb9bb6aa28634a8de3a748a97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20H=C3=A4rdeman?= Date: Tue, 1 Dec 2026 12:05:16 +0000 Subject: [PATCH] odhcpd: create /tmp/odhcpd in the init script MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit odhcpd creates its default lease directory /tmp/odhcpd/leases itself, which only works while it runs as root. Create /tmp/odhcpd in the init script, owned by root and with fixed permissions, so that it only needs to be handed over to the odhcpd user once odhcpd runs unprivileged (#24558). Signed-off-by: David Härdeman Link: https://github.com/openwrt/openwrt/pull/27183 Signed-off-by: Robert Marko --- package/network/services/odhcpd/files/odhcpd.init | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/package/network/services/odhcpd/files/odhcpd.init b/package/network/services/odhcpd/files/odhcpd.init index 0bb0b1f96d2..a2b69418741 100644 --- a/package/network/services/odhcpd/files/odhcpd.init +++ b/package/network/services/odhcpd/files/odhcpd.init @@ -5,6 +5,10 @@ STOP=85 USE_PROCD=1 start_service() { + mkdir -p /tmp/odhcpd + find /tmp/odhcpd -type d -exec chmod 0755 {} \; + # chown -R odhcpd:odhcpd /tmp/odhcpd + procd_open_instance procd_set_param command /usr/sbin/odhcpd procd_set_param respawn