Files
apfstests/tests/generic/545.out
T
Jiufei Xue 80bac2129b generic: check CAP_LINUX_IMMUTABLE capability
It should return error while changing IMMUTABLE_FL and APPEND_FL if the
process has no capability CAP_LINUX_IMMUTABLE.

However, it's not true on overlayfs after kernel version v4.19 since
the process's subjective cred is overridden with ofs->creator_cred
before calling real vfs_ioctl.

The following patch for ovl fix the problem:
  "ovl: check the capability before cred overridden"

Add this testcase to cover this bug.

Signed-off-by: Jiufei Xue <jiufei.xue@linux.alibaba.com>
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
2019-05-10 16:30:23 +08:00

10 lines
318 B
Plaintext

QA output created by 545
Create the original files
Try to chattr +ia with capabilities CAP_LINUX_IMMUTABLE
Try to chattr +ia/-ia without capability CAP_LINUX_IMMUTABLE
Operation not permitted
Operation not permitted
Operation not permitted
Operation not permitted
Try to chattr -ia with capability CAP_LINUX_IMMUTABLE