iotests/308: Fix for CAP_DAC_OVERRIDE
commite2eec2819a96f3a5d68f899c836ad365468cec01
authorHanna Reitz <hreitz@redhat.com>
Mon, 3 Jan 2022 12:00:14 +0000 (3 13:00 +0100)
committerKevin Wolf <kwolf@redhat.com>
Fri, 14 Jan 2022 11:03:16 +0000 (14 12:03 +0100)
treeb7520cd17851804691eb77f84e3a9a55fbc0a1e4
parent2ca1d5d6b91f8a52a5c651f660b2f58c94bf97ba
iotests/308: Fix for CAP_DAC_OVERRIDE

With CAP_DAC_OVERRIDE (which e.g. root generally has), permission checks
will be bypassed when opening files.

308 in one instance tries to open a read-only file (FUSE export) with
qemu-io as read/write, and expects this to fail.  However, when running
it as root, opening will succeed (thanks to CAP_DAC_OVERRIDE) and only
the actual write operation will fail.

Note this as "Case not run", but have the test pass in either case.

Reported-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Fixes: 2c7dd057aa7bd7a875e9b1a53975c220d6380bc4
       ("export/fuse: Pass default_permissions for mount")
Signed-off-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20220103120014.13061-1-hreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
tests/qemu-iotests/308
tests/qemu-iotests/308.out