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

@ -138,6 +138,7 @@ message criu_opts {
optional string lsm_mount_context = 63;
optional criu_network_lock_method network_lock = 64 [default = IPTABLES];
optional bool mntns_compat_mode = 65;
optional bool skip_file_rwx_check = 66;
/* optional bool check_mounts = 128; */
}