mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 06:15:24 +00:00
servicefd: add a service fd for current root
It's already used for dumping files and it will be used for restoring, so it should be service fd to avoid intersection with restored descriptors. 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
302591aa05
commit
87a49bdfaf
@@ -403,6 +403,7 @@ static int unix_collect_one(const struct unix_diag_msg *m,
|
||||
struct stat st;
|
||||
char rpath[PATH_MAX];
|
||||
bool drop_path = false;
|
||||
int mntns_root;
|
||||
|
||||
if (name[0] != '/') {
|
||||
pr_warn("Relative bind path '%s' "
|
||||
@@ -416,6 +417,8 @@ static int unix_collect_one(const struct unix_diag_msg *m,
|
||||
goto skip;
|
||||
}
|
||||
|
||||
mntns_root = get_service_fd(ROOT_FD_OFF);
|
||||
|
||||
uv = RTA_DATA(tb[UNIX_DIAG_VFS]);
|
||||
snprintf(rpath, sizeof(rpath), ".%s", name);
|
||||
if (fstatat(mntns_root, rpath, &st, 0)) {
|
||||
|
Reference in New Issue
Block a user