Bug #3346
closed
client: we broken open permissions
Added by Sage Weil over 11 years ago.
Updated almost 8 years ago.
Description
../pjd-fstest-20080816/tests/open/00.t (Wstat: 0 Tests: 47 Failed: 4)
Failed tests: 5, 8, 11, 14
../pjd-fstest-20080816/tests/open/06.t (Wstat: 0 Tests: 72 Failed: 3)
Failed tests: 30, 34, 38
reverting 328bf482349485b90911fe8953d8ce5f0769c69e fixes it.
first two:
vapre:/home/sage/src/ceph/src/mnt/pjd-fstest-20080816/tests/open# ../../fstest open foo O_CREAT,O_WRONLY 0151
open returned -1
EIO
vapre:/home/sage/src/ceph/src/mnt/pjd-fstest-20080816/tests/open# ../../fstest open /tmp/foo O_CREAT,O_WRONLY 0151
0
and
vapre:/home/sage/src/ceph/src/mnt/pjd-fstest-20080816/tests/open# ../../fstest -U 077 open foo O_CREAT,O_WRONLY 0151
open returned -1
EIO
vapre:/home/sage/src/ceph/src/mnt/pjd-fstest-20080816/tests/open# ../../fstest -U 077 open /tmp/foo2 O_CREAT,O_WRONLY 0151
0
I didn't fully understand the (subtle) semantics of open() with O_CREAT and the mode. It expects the file to first be create/opened with the given flags, and after that the mode is set on the file. So permissions checking of the flags against the file's mode can only take place if the file already exists. I've pushed a fix to the wip-3346 branch.
- Status changed from 12 to Resolved
- Component(FS) Client added
Also available in: Atom
PDF