Re: [PATCH 4/6] cr: checkpoint and restore task credentials

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Serge E. Hallyn wrote:

> +static struct user_namespace *restore_read_userns(struct ckpt_ctx *ctx)
> +{
> +	struct ckpt_hdr_user_ns *h;
> +	struct user_namespace *ns;
> +	struct user_struct *new_root, *creator;
> +
> +	h = ckpt_read_obj_type(ctx, sizeof(*h), CKPT_HDR_USER_NS);
> +	if (IS_ERR(h))
> +		return ERR_PTR(PTR_ERR(h));
> +	if (h->flags & CKPT_USERNS_INIT) {

Perhaps make it future-safe by disallowing other flags ?

> +		ckpt_hdr_put(ctx, h);
> +		/* grab an extra ref bc objhash will drop an extra */
> +		return get_user_ns(current_user_ns());
> +	}

Oren.

_______________________________________________
Containers mailing list
Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/containers

[Index of Archives]     [Cgroups]     [Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux