2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-31 22:35:33 +00:00

config/files-reg: Add opt to skip file r/w/x check on restore

A file's r/w/x changing between checkpoint and restore does
not necessarily imply that something is wrong. For example,
if a process opens a file having perms rw- for reading and
we change the perms to r--, the process can be restored and
will function as expected.

Therefore, this patch adds an option

--skip-file-rwx-check

to disable this check on restore. File validation is unaffected
and should still function as expected with respect to the content
of files.

Signed-off-by: Younes Manton <ymanton@ca.ibm.com>
This commit is contained in:
Younes Manton
2022-05-30 17:34:20 +00:00
committed by Andrei Vagin
parent 6cef6e726a
commit 18fba41255
9 changed files with 40 additions and 3 deletions

View File

@@ -555,6 +555,17 @@ void criu_set_shell_job(bool shell_job)
criu_local_set_shell_job(global_opts, shell_job);
}
void criu_local_set_skip_file_rwx_check(criu_opts *opts, bool skip_file_rwx_check)
{
opts->rpc->has_skip_file_rwx_check = true;
opts->rpc->skip_file_rwx_check = skip_file_rwx_check;
}
void criu_set_skip_file_rwx_check(bool skip_file_rwx_check)
{
criu_local_set_skip_file_rwx_check(global_opts, skip_file_rwx_check);
}
void criu_local_set_orphan_pts_master(criu_opts *opts, bool orphan_pts_master)
{
opts->rpc->has_orphan_pts_master = true;