]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commit
overlay: File capabilities should not be lost over copy-up
authorVivek Goyal <vgoyal@redhat.com>
Wed, 16 Jan 2019 21:04:15 +0000 (16:04 -0500)
committerEryu Guan <guaneryu@gmail.com>
Thu, 17 Jan 2019 03:15:09 +0000 (11:15 +0800)
commit23703a8d22dbe293ebcbd4a2faa5a623dff3be56
treec0d2ab19934926beaa7cbbc2c7a0c71c1bc036a2
parentbe5dedec18d2dbc5125c49c58e43eef49498918c
overlay: File capabilities should not be lost over copy-up

Make sure file capabilities are not lost over copy-up when file is
opened for WRITE but nothing is actually written to it.

Following commit introduced regression where if a lower file with
CAP_SETUID is opened for writing, and capability is cleared over copy up.

bd64e57586d3 ("ovl: During copy up, first copy up metadata and then data")

A later kernel patch will fix it. This test will help avoid introducing
such regressions again.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
tests/overlay/064 [new file with mode: 0755]
tests/overlay/064.out [new file with mode: 0644]
tests/overlay/group