Actions
Bug #3346
closedclient: we broken open permissions
% Done:
0%
Source:
Q/A
Tags:
Backport:
Regression:
Severity:
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
Client
Labels (FS):
Pull request ID:
Crash signature (v1):
Crash signature (v2):
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.
Updated by Sage Weil over 11 years ago
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
Updated by Sam Lang over 11 years ago
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.
Actions