Project

General

Profile

Actions

Bug #71015

closed

chown methods have int uid/gid parameters instead of uid_t and gid_t parameters

Added by Cecilia Lau 11 months ago. Updated 8 months ago.

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

0%

Source:
Community (dev)
Backport:
reef,squid,tentacle
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
cephfs.pyx, libcephfs
Labels (FS):
Pull request ID:
Tags (freeform):
backport_processed
Fixed In:
v20.3.0-469-g53ef9b11ec
Released In:
Upkeep Timestamp:
2025-07-14T16:45:57+00:00

Description

In libcephfs, the ceph_chown, ceph_fchown, and ceph_lchown methods accept int uid and int gid, where I'd expect they should accept uid_t uid and gid_t gid.

Additonally, the python bindings in cephfs.pyx for chown and lchown expect int instead of uid_t or gid_t.

This means that to chown a uid or gid greater than or equal to 2^31, you must input the 2's complement of that number. For example, chowning with a uid=0 and gid=4200000464 fails to convert the gid to an int, but chowning with a uid=0 and gid=-94966832 results in correct gid of 4200000464.


Related issues 3 (0 open3 closed)

Copied to CephFS - Backport #71398: reef: chown methods have int uid/gid parameters instead of uid_t and gid_t parametersRejectedActions
Copied to CephFS - Backport #71399: squid: chown methods have int uid/gid parameters instead of uid_t and gid_t parametersRejectedActions
Copied to CephFS - Backport #71400: tentacle: chown methods have int uid/gid parameters instead of uid_t and gid_t parametersRejectedActions
Actions #1

Updated by Cecilia Lau 11 months ago

  • Pull request ID set to 62934
Actions #2

Updated by Venky Shankar 11 months ago

  • Category set to Correctness/Safety
  • Status changed from New to Fix Under Review
  • Target version set to v20.0.0
  • Source set to Community (dev)
  • Backport set to reef,squid
Actions #3

Updated by Venky Shankar 10 months ago

  • Status changed from Fix Under Review to Pending Backport
  • Target version changed from v20.0.0 to v21.0.0
  • Backport changed from reef,squid to reef,squid,tentacle
Actions #4

Updated by Upkeep Bot 10 months ago

  • Copied to Backport #71398: reef: chown methods have int uid/gid parameters instead of uid_t and gid_t parameters added
Actions #5

Updated by Upkeep Bot 10 months ago

  • Copied to Backport #71399: squid: chown methods have int uid/gid parameters instead of uid_t and gid_t parameters added
Actions #6

Updated by Upkeep Bot 10 months ago

  • Copied to Backport #71400: tentacle: chown methods have int uid/gid parameters instead of uid_t and gid_t parameters added
Actions #7

Updated by Upkeep Bot 10 months ago

  • Tags (freeform) set to backport_processed
Actions #8

Updated by Upkeep Bot 9 months ago

  • Status changed from Pending Backport to Resolved
  • Merge Commit set to 53ef9b11ec2c03371725322640bfeb7ac331d914
  • Fixed In set to v20.3.0-469-g53ef9b11ec2
  • Upkeep Timestamp set to 2025-07-08T14:46:33+00:00
Actions #9

Updated by Upkeep Bot 8 months ago

  • Fixed In changed from v20.3.0-469-g53ef9b11ec2 to v20.3.0-469-g53ef9b11ec
  • Upkeep Timestamp changed from 2025-07-08T14:46:33+00:00 to 2025-07-14T16:45:57+00:00
Actions

Also available in: Atom PDF