Project

General

Profile

Actions

Bug #19903

closed

LibCephFS.ClearSetuid fails

Added by Zheng Yan almost 7 years ago. Updated almost 7 years ago.

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

0%

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

Description

all libcephfs/test.sh failures in http://pulpito.ceph.com/pdonnell-2017-05-10_02:32:15-fs-wip-pdonnell-integration-distro-basic-smithi/

2017-05-10T03:53:54.591 INFO:tasks.workunit.client.0.smithi197.stdout:/mnt/jenkins/workspace/ceph-dev-new-build/ARCH/x86_64/AVAILABLE_ARCH/x86_64/AVAILABLE_DIST/centos7/DIST/centos7/MACHINE_SIZE/huge/release/12.0.1-2237-g658c964/rpm/el7/BUILD/ceph-12.0.1-2237-g658c964/src/test/libcephfs/test.cc:1765: Failure
2017-05-10T03:53:54.591 INFO:tasks.workunit.client.0.smithi197.stdout:      Expected: stx.stx_mode & (mode_t)(04000|02000|01000|(0400|0200|0100)|((0400|0200|0100) >> 3)|(((0400|0200|0100) >> 3) >> 3))
2017-05-10T03:53:54.591 INFO:tasks.workunit.client.0.smithi197.stdout:      Which is: 2552
2017-05-10T03:53:54.591 INFO:tasks.workunit.client.0.smithi197.stdout:To be equal to: before_mode
2017-05-10T03:53:54.591 INFO:tasks.workunit.client.0.smithi197.stdout:      Which is: 3576

It seems S_ISGID got cleared by code in Client::may_setattr

  if (mask & CEPH_SETATTR_MODE) {
    if (perms.uid() != 0 && perms.uid() != in->uid)
      goto out;

    gid_t i_gid = (mask & CEPH_SETATTR_GID) ? stx->stx_gid : in->gid;
    if (perms.uid() != 0 && !perms.gid_in_groups(i_gid))
      stx->stx_mode &= ~S_ISGID;
  }
Actions #1

Updated by Zheng Yan almost 7 years ago

  • Status changed from New to Fix Under Review
Actions #2

Updated by John Spray almost 7 years ago

  • Status changed from Fix Under Review to Resolved
Actions

Also available in: Atom PDF