procd: assign conventional /dev/net/tun permissions

Set /dev/net/tun to mode 0666, matching the TUN/TAP permissions
documented by docs.kernel.org[1] and the default udev policy used by
other Linux systems[2].

This avoids forcing otherwise unprivileged processes to retain elevated
privileges solely to open the device node.

Interface creation and attachment remain subject to the kernel's usual
capability and ownership checks.

[1] https://docs.kernel.org/networking/tuntap.html#configuration
[2] https://github.com/systemd/systemd/blob/be1e78ec49f8c84c634d9e58dae834b27ea28436/rules.d/50-udev-default.rules.in#L111

Signed-off-by: Gary Dotzler <geldot@protonmail.com>
Link: https://github.com/openwrt/openwrt/pull/25464
Signed-off-by: Nick Hainke <vincent@systemli.org>
This commit is contained in:
Gary Dotzler authored and Nick Hainke committed 2026-10-11 09:57:57 +02:00
1 parent acd6f78a80
commit 17a3a87f6e
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=procd
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/procd.git
+1 -1
View File
@@ -20,7 +20,7 @@
],
[ "if",
[ "eq", "DEVNAME",
[ "full", "ptmx", "zero", "tty", "net", "random", "urandom" ]
[ "full", "ptmx", "zero", "tty", "net", "net/tun", "random", "urandom" ]
],
[
[ "makedev", "/dev/%DEVNAME%", "0666" ],