]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
tuntap(4): restrict scope of net.link.tap.user_open slightly
authorkevans <kevans@FreeBSD.org>
Mon, 21 Oct 2019 14:38:11 +0000 (14:38 +0000)
committerkevans <kevans@FreeBSD.org>
Mon, 21 Oct 2019 14:38:11 +0000 (14:38 +0000)
commit26d6f82958d398421ef13ed0b979acb28e18ae21
tree38fd73b127c5cd2abcedc96d95cc3eeac8eb6027
parentbd88b637253caf1b40ffccd76eb413c646d6f85e
tuntap(4): restrict scope of net.link.tap.user_open slightly

net.link.tap.user_open has historically allowed non-root users to do devfs
cloning and open /dev/tap* nodes based on permissions. Loosen this up to
make it only allow users to do devfs cloning -- we no longer check it in
tunopen.

This allows tap devices to be created that can actually be opened by a user,
rather than swiftly restricting them to root because the magic sysctl has
not been set.

The sysctl has not yet been completely deprecated, because more thought is
needed for how to handle the devfs cloning case. There is not an easy
suitable replacement for the sysctl there, and more care needs to be placed
in determining whether that's OK or not.

PR: 200185
UPDATING
sys/net/if_tuntap.c