Project

General

Profile

Actions

Bug #17548

closed

should userland ceph_llseek do permission checking?

Added by Jeff Layton over 7 years ago. Updated over 7 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
-
% Done:

0%

Source:
other
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
libcephfs
Labels (FS):
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

One of the test failures here:

http://qa-proxy.ceph.com/teuthology/jlayton-2016-10-08_00:13:32-fs-wip-jlayton-cephfs---basic-mira/461616/teuthology.log

...was a case where ceph_lseek got back -EPERM. Looking at the code, _lseek does this:

  if (!may_open(f->inode.get(), f->flags, perms)) {                             
    return -EPERM;                                                              
  }                                                                             

I'm not sure this is correct though. lseek operates on an already-opened fd. The kernel ceph client (and llseek calls in general) do not do permission checking on these calls. Do we need to do that here?

Actions

Also available in: Atom PDF