[CRIU] Re: [PATCH 2/3] dump: Add dumping of file owners

Cyrill Gorcunov gorcunov at openvz.org
Fri Mar 23 11:56:12 EDT 2012


On Fri, Mar 23, 2012 at 07:17:58PM +0400, Cyrill Gorcunov wrote:
> Actually i would prefer to move these fields into a separate
> structure say
> 
> struct fowners {
> 	...
> };
> 
> And insert it into fdinfo_entry and pipe_entry, but I'm not
> sure if you like this.
> > 
> 

Actually I've had to redefine all this as

typedef struct {
	u32	uid;
	u32	euid;
	u32	signum;
	u32	pid_type;
	u32	pid;
} __packed fown_t;

struct fdinfo_entry {
	u8	type;
	u8	len;
	u16	flags;
	u32	pos;
	u64	addr;
	u64	id;
	fown_t	owner;
	u8	name[0];
} __packed;

struct pipe_entry {
	u32	fd;
	u32	pipeid;
	u32	flags;
	u32	bytes;
	fown_t	owner;
	u8	data[0];
} __packed;

otherwise it become too ugly on restore ;)

	Cyrill


More information about the CRIU mailing list