This reverts commit 7cb9e7ae7041f348f2be384ea17352e117f3d00d. We switch from procfs ns-files to nsfs ones, so we will apply nsfs version of the patch instead.
https://jira.sw.ru/browse/PSBM-102357 Signed-off-by: Pavel Tikhomirov <[email protected]> --- drivers/net/tun.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/drivers/net/tun.c b/drivers/net/tun.c index c2bebdeab0bc..81b305abbf05 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -71,7 +71,6 @@ #include <net/sock.h> #include <linux/skb_array.h> #include <linux/seq_file.h> -#include <linux/proc_ns.h> #include <asm/uaccess.h> @@ -2339,7 +2338,7 @@ static long __tun_chr_ioctl(struct file *file, unsigned int cmd, bool do_notify = false; if (cmd == TUNSETIFF || cmd == TUNSETQUEUE || cmd == TUNSETACCTID || - (_IOC_TYPE(cmd) == 0x89 && cmd != SIOCGSKNS)) { + _IOC_TYPE(cmd) == 0x89) { if (copy_from_user(&ifr, argp, ifreq_len)) return -EFAULT; } else { @@ -2391,14 +2390,6 @@ static long __tun_chr_ioctl(struct file *file, unsigned int cmd, tfile->ifindex = ifindex; goto unlock; } - if (cmd == SIOCGSKNS) { - ret = -EPERM; - if (!ns_capable(tfile->net->user_ns, CAP_NET_ADMIN)) - goto unlock; - - ret = open_net_ns_fd(tfile->net); - goto unlock; - } ret = -EBADFD; if (!tun) -- 2.24.1 _______________________________________________ Devel mailing list [email protected] https://lists.openvz.org/mailman/listinfo/devel
