From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753624AbbCQCpT (ORCPT ); Mon, 16 Mar 2015 22:45:19 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:38144 "EHLO out3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752168AbbCQCpM (ORCPT ); Mon, 16 Mar 2015 22:45:12 -0400 X-Sasl-enc: v9yGYHK8LU480Q7aR3IqpnaI9yumOAZFvJB0uDTsdTFJ 1426560311 Subject: [RFC PATCH v4 01/12] nsproxy - make create_new_namespaces() non-static From: Ian Kent To: Kernel Mailing List Cc: David Howells , Oleg Nesterov , Trond Myklebust , "J. Bruce Fields" , Benjamin Coddington , Al Viro , Jeff Layton , "Eric W. Biederman" Date: Tue, 17 Mar 2015 10:44:56 +0800 Message-ID: <20150317024456.24592.68737.stgit@pluto.fritz.box> In-Reply-To: <20150317022308.24592.35785.stgit@pluto.fritz.box> References: <20150317022308.24592.35785.stgit@pluto.fritz.box> User-Agent: StGit/0.17-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ian Kent create_new_namespaces() will be needed by usermodehelper namespace restricted execution. Signed-off-by: Ian Kent Cc: Benjamin Coddington Cc: Al Viro Cc: J. Bruce Fields Cc: David Howells Cc: Trond Myklebust Cc: Stanislav Kinsbursky Cc: Oleg Nesterov Cc: Eric W. Biederman --- include/linux/nsproxy.h | 3 +++ kernel/nsproxy.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/include/linux/nsproxy.h b/include/linux/nsproxy.h index 35fa08f..dfe7dda 100644 --- a/include/linux/nsproxy.h +++ b/include/linux/nsproxy.h @@ -62,6 +62,9 @@ extern struct nsproxy init_nsproxy; * */ +struct nsproxy *create_new_namespaces(unsigned long flags, + struct task_struct *tsk, struct user_namespace *user_ns, + struct fs_struct *new_fs); int copy_namespaces(unsigned long flags, struct task_struct *tsk); void exit_task_namespaces(struct task_struct *tsk); void switch_task_namespaces(struct task_struct *tsk, struct nsproxy *new); diff --git a/kernel/nsproxy.c b/kernel/nsproxy.c index 49746c8..48d5e4a 100644 --- a/kernel/nsproxy.c +++ b/kernel/nsproxy.c @@ -56,7 +56,7 @@ static inline struct nsproxy *create_nsproxy(void) * Return the newly created nsproxy. Do not attach this to the task, * leave it to the caller to do proper locking and attach it to task. */ -static struct nsproxy *create_new_namespaces(unsigned long flags, +struct nsproxy *create_new_namespaces(unsigned long flags, struct task_struct *tsk, struct user_namespace *user_ns, struct fs_struct *new_fs) {