]> git.baikalelectronics.ru Git - kernel.git/commit
ovl: drop CAP_SYS_RESOURCE from saved mounter's credentials
authorKonstantin Khlebnikov <khlebnikov@yandex-team.ru>
Tue, 10 Jan 2017 18:30:21 +0000 (21:30 +0300)
committerMiklos Szeredi <mszeredi@redhat.com>
Tue, 7 Feb 2017 14:47:14 +0000 (15:47 +0100)
commit6f85746dbf28e72f280c915cd1f34261ab8b9b8b
treeb5ca89d2ee7d508616995e9b68792fb8363e844c
parentcc8172d4a5e7b3f601e49af73b9a61317ab2086a
ovl: drop CAP_SYS_RESOURCE from saved mounter's credentials

If overlay was mounted by root then quota set for upper layer does not work
because overlay now always use mounter's credentials for operations.
Also overlay might deplete reserved space and inodes in ext4.

This patch drops capability SYS_RESOURCE from saved credentials.
This affects creation new files, whiteouts, and copy-up operations.

Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Fixes: 7dd87d7d9629 ("ovl: do operations on underlying file system in mounter's context")
Cc: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/overlayfs/super.c