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

Oren Laadan orenl at cs.columbia.edu
Wed May 20 09:56:54 PDT 2009



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 at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers




More information about the Devel mailing list