mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-30 05:48:05 +00:00
files: drop O_TMPFILE from file descriptor flags
Unnamed temporary files are restored as ghost files. If O_TMPFILE is set for the open() syscall, the pathname argument specifies a directory, but criu gives a path to a ghost file. (00.107450) 36: Error (criu/files-reg.c:1757): Can't open file tmp/#42274874 on restore: Not a directory Reviewed-by: Dmitry Safonov <0x7f454c46@gmail.com> Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
This commit is contained in:
parent
9b2ecd4948
commit
2600d6e76d
@ -1752,6 +1752,9 @@ int do_open_reg_noseek_flags(int ns_root_fd, struct reg_file_info *rfi, void *ar
|
||||
u32 flags = *(u32 *)arg;
|
||||
int fd;
|
||||
|
||||
/* unnamed temporary files are restored as ghost files */
|
||||
flags &= ~O_TMPFILE;
|
||||
|
||||
fd = openat(ns_root_fd, rfi->path, flags);
|
||||
if (fd < 0) {
|
||||
pr_perror("Can't open file %s on restore", rfi->path);
|
||||
|
Loading…
x
Reference in New Issue
Block a user