ovl: check permission to open real file
authorMiklos Szeredi <mszeredi@redhat.com>
Tue, 2 Jun 2020 20:20:26 +0000 (22:20 +0200)
committerMiklos Szeredi <mszeredi@redhat.com>
Wed, 3 Jun 2020 07:45:22 +0000 (09:45 +0200)
commit05acefb4872dae89e772729efb194af754c877e8
tree9a53947fdb6ac28bca724cfb7a05090fea1f3b8d
parent292f902a40c11f043a5ca1305a114da0e523eaa3
ovl: check permission to open real file

Call inode_permission() on real inode before opening regular file on one of
the underlying layers.

In some cases ovl_permission() already checks access to an underlying file,
but it misses the metacopy case, and possibly other ones as well.

Removing the redundant permission check from ovl_permission() should be
considered later.

Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/overlayfs/file.c