rpc: Support setting images_dir by path.

Google's RPC client process is in a different pidns and has more privileges --
CRIU can't open its /proc/<pid>/fd/<fd>.  For images_dir_fd to be useful here
it would need to refer to a passed or CRIU's fd.

From: Michał Cłapiński <mclapinski@google.com>
Change-Id: Icbfb5af6844b21939a15f6fbb5b02264c12341b1
Signed-off-by: Michał Mirosław <emmir@google.com>
This commit is contained in:
Michał Mirosław 2023-06-22 17:38:33 +02:00 committed by Andrei Vagin
parent 439b522433
commit 2aa9cb9333
2 changed files with 9 additions and 2 deletions

View file

@ -61,7 +61,8 @@ enum criu_pre_dump_mode {
};
message criu_opts {
required int32 images_dir_fd = 1;
required int32 images_dir_fd = 1 [default = -1];
optional string images_dir = 68; /* used only if images_dir_fd == -1 */
optional int32 pid = 2; /* if not set on dump, will dump requesting process */
optional bool leave_running = 3;