]> git.baikalelectronics.ru Git - kernel.git/commit
net: make net namespace sysctls belong to container's owner
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 10 Aug 2016 21:36:02 +0000 (14:36 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 15 Aug 2016 04:08:58 +0000 (21:08 -0700)
commitd327a32fb4050cbdc744e9567907642809256471
treead2cc7b3534b8767f507caf65b093fe4fca43fa9
parent0d9b7c4dc98c0a4df16d205747b60e8fe059075e
net: make net namespace sysctls belong to container's owner

If net namespace is attached to a user namespace let's make container's
root owner of sysctls affecting said network namespace instead of global
root.

This also allows us to clean up net_ctl_permissions() because we do not
need to fudge permissions anymore for the container's owner since it now
owns the objects in question.

Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
fs/proc/proc_sysctl.c
include/linux/sysctl.h
net/sysctl_net.c