]> git.baikalelectronics.ru Git - kernel.git/commit
net: Verify permission to dest_net in newlink
authorEric W. Biederman <ebiederm@xmission.com>
Thu, 26 Feb 2015 22:19:00 +0000 (16:19 -0600)
committerDavid S. Miller <davem@davemloft.net>
Sat, 28 Feb 2015 20:14:44 +0000 (15:14 -0500)
commitfebdbe135dccae2fbad6ee5de9f873ee9b914d6e
tree857c9f8d321d1413d001081def142ae648b0f409
parent0c5f784bb74720ffc1f84e254d027c136738aa40
net: Verify permission to dest_net in newlink

When applicable verify that the caller has permision to create a
network device in another network namespace.  This check is already
present when moving a network device between network namespaces in
setlink so all that is needed is to duplicate that check in newlink.

This change almost backports cleanly, but there are context conflicts
as the code that follows was added in v4.0-rc1

Fixes: 87e13f5b3483 net: Enable a userns root rtnl calls that are safe for unprivilged users
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/rtnetlink.c