mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 14:25:49 +00:00
userns: save uid-s from a target userns (v2)
We are going to support user namespaces and uid-s will be converted accoding with userns mappings. v2: conver id-s for sockets too Signed-off-by: Andrey Vagin <avagin@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
committed by
Pavel Emelyanov
parent
71a9cd0634
commit
30711b109d
15
namespaces.c
15
namespaces.c
@@ -477,6 +477,21 @@ int dump_task_ns_ids(struct pstree_item *item)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int userns_id(int id)
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
int userns_uid(int uid)
|
||||
{
|
||||
return userns_id(uid);
|
||||
}
|
||||
|
||||
int userns_gid(int gid)
|
||||
{
|
||||
return userns_id(gid);
|
||||
}
|
||||
|
||||
static int dump_user_ns(pid_t pid, int ns_id)
|
||||
{
|
||||
pr_err("User namesapces are not supported yet\n");
|
||||
|
Reference in New Issue
Block a user