On Sun, Jul 24, 2016 at 09:30:03AM -0500, Eric W. Biederman wrote:
> I am not at all certain it makes sense to return -ENOENT.
>
> Without the -ENOENT check the code is much cleaner, and clearer.
This is fine with me, and makes even more sense for owner (user)
namespaces than it does for net name
On Thu, Jul 14, 2016 at 07:12:19PM -0700, Andrey Vagin wrote:
> +struct ns_common *ns_get_owner(struct ns_common *ns)
> +{
> + …
> + return &get_user_ns(user_ns)->ns;
> +}
Is there a reason to return the generic ‘struct ns_common *’ here
instead of ‘struct user_namespace *’? The current u
Andrew Vagin writes:
> On Sun, Jul 24, 2016 at 12:03:49AM -0500, Eric W. Biederman wrote:
>> Andrey Vagin writes:
>>
>> > Return -EPERM if an owning user namespace is outside of a process
>> > current user namespace.
>> >
>> > diff --git a/kernel/user_namespace.c b/kernel/user_namespace.c
>> >
On Sun, Jul 24, 2016 at 12:03:49AM -0500, Eric W. Biederman wrote:
> Andrey Vagin writes:
>
> > Return -EPERM if an owning user namespace is outside of a process
> > current user namespace.
> >
> > diff --git a/kernel/user_namespace.c b/kernel/user_namespace.c
> > index a5bc78c..6382e5e 100644
>
Andrey Vagin writes:
> Return -EPERM if an owning user namespace is outside of a process
> current user namespace.
>
> diff --git a/kernel/user_namespace.c b/kernel/user_namespace.c
> index a5bc78c..6382e5e 100644
> --- a/kernel/user_namespace.c
> +++ b/kernel/user_namespace.c
> @@ -994,6 +994,30
Return -EPERM if an owning user namespace is outside of a process
current user namespace.
Signed-off-by: Andrey Vagin
---
include/linux/user_namespace.h | 7 +++
kernel/user_namespace.c| 24
2 files changed, 31 insertions(+)
diff --git a/include/linux/user_
On Thu, Jul 14, 2016 at 11:20:16AM -0700, Andrey Vagin wrote:
> +struct ns_common *ns_get_owner(struct ns_common *ns)
> +{
> + const struct cred *cred = current_cred();
> + struct user_namespace *user_ns, *p;
> +
> + user_ns = p = ns->user_ns;
> + if (user_ns == NULL) { /* ns is ini
Return -EPERM if an owning user namespace is outside of a process
current user namespace.
Signed-off-by: Andrey Vagin
---
include/linux/user_namespace.h | 7 +++
kernel/user_namespace.c| 24
2 files changed, 31 insertions(+)
diff --git a/include/linux/user_
8 matches
Mail list logo