From 281f4aa59ef07c0f3de163d59d7df678c8830d20 Mon Sep 17 00:00:00 2001 From: Jouke Witteveen Date: Mon, 15 Apr 2013 21:54:14 +0200 Subject: Allow group-accessible tuntap devices The tuntap connection type requires both a User and a Group to be defined. However, when configuring a tuntap device in the kernel, the device's uid and gid must both match for someone to be able to use the device. The only way to create a tuntap device accessible to a group of users is therefore to avoid specifying the user argument to "ip tuntap add". Reported by: A Web --- src/lib/connections/tuntap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lib/connections') diff --git a/src/lib/connections/tuntap b/src/lib/connections/tuntap index 47668b1..d035262 100644 --- a/src/lib/connections/tuntap +++ b/src/lib/connections/tuntap @@ -10,7 +10,7 @@ tuntap_up() { return 1 else ip tuntap add dev "$Interface" mode "$Mode" \ - user "$User" group "$Group" + ${User:+user "$User"} ${Group:+group "$Group"} fi bring_interface_up "$Interface" IP=${IP-no} ip_set -- cgit v1.2.3-24-g4f1b