Project

General

Profile

Bug #19903

LibCephFS.ClearSetuid fails

Added by Zheng Yan 14 days ago. Updated 9 days ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
05/10/2017
Due date:
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Release:
Component(FS):
Needs Doc:
No

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;
  }

History

#1 Updated by Zheng Yan 12 days ago

  • Status changed from New to Need Review

#2 Updated by John Spray 9 days ago

  • Status changed from Need Review to Resolved

Also available in: Atom PDF