proc: allow access in init userns for map_files with CAP_CHECKPOINT_RESTORE
authorAdrian Reber <areber@redhat.com>
Sun, 19 Jul 2020 10:04:14 +0000 (12:04 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Sun, 19 Jul 2020 18:14:42 +0000 (20:14 +0200)
commit12886f8ab10ce6a09af1d92535d49c81aaa215a8
tree5216c20df0841870c59b86e55c52d5860d948900
parentb9a3db92e1a1f281724e2f34b849d18d1a53bece
proc: allow access in init userns for map_files with CAP_CHECKPOINT_RESTORE

Opening files in /proc/pid/map_files when the current user is
CAP_CHECKPOINT_RESTORE capable in the root namespace is useful for
checkpointing and restoring to recover files that are unreachable via
the file system such as deleted files, or memfd files.

Signed-off-by: Adrian Reber <areber@redhat.com>
Signed-off-by: Nicolas Viennot <Nicolas.Viennot@twosigma.com>
Reviewed-by: Cyrill Gorcunov <gorcunov@gmail.com>
Reviewed-by: Serge Hallyn <serge@hallyn.com>
Link: https://lore.kernel.org/r/20200719100418.2112740-5-areber@redhat.com
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
fs/proc/base.c