diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/tun.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 457f2d7430cf..15d67635bb10 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c | |||
@@ -123,7 +123,7 @@ static int tun_attach(struct tun_struct *tun, struct file *file) | |||
123 | 123 | ||
124 | /* Check permissions */ | 124 | /* Check permissions */ |
125 | if (((tun->owner != -1 && cred->euid != tun->owner) || | 125 | if (((tun->owner != -1 && cred->euid != tun->owner) || |
126 | (tun->group != -1 && cred->egid != tun->group)) && | 126 | (tun->group != -1 && !in_egroup_p(tun->group))) && |
127 | !capable(CAP_NET_ADMIN)) | 127 | !capable(CAP_NET_ADMIN)) |
128 | return -EPERM; | 128 | return -EPERM; |
129 | 129 | ||