diff --git a/criu/files-reg.c b/criu/files-reg.c index 5e63b964f..94fd4acaa 100644 --- a/criu/files-reg.c +++ b/criu/files-reg.c @@ -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);