Project

General

Profile

Actions

Bug #72547

closed

cephfs.pyx: allow passing -1 as value of UID/GID for chown() and fchown()

Added by Rishabh Dave 7 months ago. Updated 6 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Correctness/Safety
Target version:
% Done:

0%

Source:
Development
Backport:
tentacle
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
cephfs.pyx, mgr/volumes
Labels (FS):
crash
Pull request ID:
Tags (freeform):
backport_processed
Fixed In:
v20.3.0-2887-g9c7cda96b2
Released In:
Upkeep Timestamp:
2025-09-09T13:13:49+00:00

Description

When -1 is passed as value of UID/GID to chown()/lchown()/fchown() methods of
libcephfs.cc, it is implicitly converted to unsigned integer value. That's not
the case with cephfs.pyx; when -1 or any other negative value is passed the
compilation exits with following error -

OverflowError: can't convert negative value to gid_t 

Since Cython can't implicitly converty signed integer to unsigned integer
convert it, convert it explicitly. It is standard to pass -1 as value of
UID/GID to indicate that UID/GID value shouldn't be changed by call to
chown()/lchown()/fchown().

Introduced by: 65328aca31f2f5038cb602148120b9427370ed4f


Related issues 1 (0 open1 closed)

Copied to CephFS - Backport #72921: tentacle: cephfs.pyx: allow passing -1 as value of UID/GID for chown() and fchown()RejectedRishabh DaveActions
Actions #1

Updated by Rishabh Dave 7 months ago

  • Description updated (diff)
Actions #2

Updated by Rishabh Dave 7 months ago

  • Pull request ID set to 64999
Actions #3

Updated by Rishabh Dave 7 months ago

  • Labels (FS) crash added
Actions #4

Updated by Rishabh Dave 7 months ago

  • Description updated (diff)
Actions #5

Updated by Venky Shankar 7 months ago

  • Category set to Correctness/Safety
  • Status changed from New to Fix Under Review
  • Target version set to v21.0.0
  • Source set to Development
  • Backport set to tentacle
Actions #6

Updated by Upkeep Bot 6 months ago

  • Status changed from Fix Under Review to Pending Backport
  • Merge Commit set to 9c7cda96b207e1fc9363a9ff3c5d82a4e47fb455
  • Fixed In set to v20.3.0-2887-g9c7cda96b2
  • Upkeep Timestamp set to 2025-09-09T03:55:51+00:00
Actions #7

Updated by Upkeep Bot 6 months ago

  • Copied to Backport #72921: tentacle: cephfs.pyx: allow passing -1 as value of UID/GID for chown() and fchown() added
Actions #8

Updated by Upkeep Bot 6 months ago

  • Tags (freeform) set to backport_processed
Actions #9

Updated by Upkeep Bot 6 months ago

  • Status changed from Pending Backport to Resolved
  • Upkeep Timestamp changed from 2025-09-09T03:55:51+00:00 to 2025-09-09T13:13:49+00:00
Actions

Also available in: Atom PDF