summaryrefslogtreecommitdiffstats
path: root/src/lib/connections
diff options
context:
space:
mode:
authorJouke Witteveen <j.witteveen@gmail.com>2013-04-15 21:54:14 +0200
committerJouke Witteveen <j.witteveen@gmail.com>2013-04-15 21:54:14 +0200
commit281f4aa59ef07c0f3de163d59d7df678c8830d20 (patch)
tree10996e25f34c53b54f6d8f6d38e846f859030c63 /src/lib/connections
parentbb010817ab49b8b80daba4ddc9e3a0ef0cb21491 (diff)
downloadnetctl-281f4aa59ef07c0f3de163d59d7df678c8830d20.tar.gz
netctl-281f4aa59ef07c0f3de163d59d7df678c8830d20.tar.xz
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
Diffstat (limited to 'src/lib/connections')
-rw-r--r--src/lib/connections/tuntap2
1 files changed, 1 insertions, 1 deletions
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