[CRIU] [PATCH 5/5] userns: restore gid and uid maps

Cyrill Gorcunov gorcunov at gmail.com
Mon Feb 10 13:52:42 PST 2014


On Tue, Feb 11, 2014 at 12:58:17AM +0400, Andrey Vagin wrote:
> Signed-off-by: Andrey Vagin <avagin at openvz.org>
> +static int write_id_map(pid_t pid, UidGidExtent **extents, int n, char *id_map)
> +{
> +	char buf[PAGE_SIZE];
> +	int off = 0, i;
> +	int fd;
> +
> +	for (i = 0; i < n; i++)
> +		off += snprintf(buf + off, sizeof(buf) - off,
> +				"%d %d %d", extents[i]->first,
> +					extents[i]->lower_first,
> +					extents[i]->count);
> +

Lets add { } over the multiline "for" cycle (which of course
can be done later). Other than this small nit, the series looks
good to me. Thanks, Andrew!


More information about the CRIU mailing list