mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 06:15:24 +00:00
files: Add file_desc_ops::get_user_ns
Returns user_ns of file (currently it's not exported to userspace) and minimal user_ns need for restore file (for example, socket net_ns->user_ns, regulating setns() permittions). This will be need to choose correct process as owner of file master. Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
This commit is contained in:
committed by
Andrei Vagin
parent
4eb718553a
commit
ecd57e0a3c
@@ -20,6 +20,7 @@ struct file_desc;
|
||||
struct cr_imgset;
|
||||
struct rst_info;
|
||||
struct parasite_ctl;
|
||||
struct ns_id;
|
||||
|
||||
struct fd_link {
|
||||
union {
|
||||
@@ -107,6 +108,12 @@ struct file_desc_ops {
|
||||
* so it shouldn't be saved for any post-actions.
|
||||
*/
|
||||
int (*open)(struct file_desc *d, int *new_fd);
|
||||
/*
|
||||
* Returns user_ns of file (currently it's not exported to userspace)
|
||||
* and minimal user_ns need for restore file (for example, socket
|
||||
* net_ns->user_ns, regulating setns() permittions).
|
||||
*/
|
||||
void (*get_user_ns)(struct file_desc *, uint32_t *, struct ns_id **);
|
||||
char * (*name)(struct file_desc *, char *b, size_t s);
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user