mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-18 00:58:31 +00:00
When CRIU runs as root and restores a pipe, the pipe inode is created with root ownership. If the restored process runs as a non-root user and tries to reopen the pipe via /proc/self/fd/<n>, the open() fails with EACCES because the pipe inode is owned by root. Fix this by saving the pipe's uid/gid during dump (from stat) and restoring ownership with fchown() after creating the pipe. This matches how memfds and TTYs already handle ownership restoration. Fixes: #2984 Signed-off-by: Ahmed Elaidy <elaidya225@gmail.com>
15 lines
316 B
Protocol Buffer
15 lines
316 B
Protocol Buffer
// SPDX-License-Identifier: MIT
|
|
|
|
syntax = "proto2";
|
|
|
|
import "opts.proto";
|
|
import "fown.proto";
|
|
|
|
message pipe_entry {
|
|
required uint32 id = 1;
|
|
required uint32 pipe_id = 2;
|
|
required uint32 flags = 3 [(criu).hex = true];
|
|
required fown_entry fown = 4;
|
|
optional uint32 uid = 5;
|
|
optional uint32 gid = 6;
|
|
}
|