Project

General

Profile

Actions

Bug #3346

closed

client: we broken open permissions

Added by Sage Weil over 11 years ago. Updated almost 8 years ago.

Status:
Resolved
Priority:
Urgent
Assignee:
Category:
-
Target version:
-
% 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.
Actions #1

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
Actions #2

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 #3

Updated by Sage Weil over 11 years ago

  • Status changed from 12 to Resolved
Actions #4

Updated by Greg Farnum almost 8 years ago

  • Component(FS) Client added
Actions

Also available in: Atom PDF