Skip to content

global: use getgrnam() instead of getgrnam_r() for setgroup - #60094

Closed
cbodley wants to merge 1 commit into
ceph:mainfrom
cbodley:wip-40692
Closed

cbodley wants to merge 1 commit into
ceph:mainfrom
cbodley:wip-40692

Conversation

@cbodley

@cbodley cbodley commented Oct 2, 2024

Copy link
Copy Markdown
Contributor

getgrnam_r() can fail with ERANGE if the provided buffer isn't large enough to hold the list of members

use getgrnam() instead which doesn't take an input buffer, but returns a pointer to the group. this function isn't thread-safe, but we shouldn't expect global_init() to race with itself or changes to the locale

Fixes: https://tracker.ceph.com/issues/40692

Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows
  • jenkins test rook e2e

getgrnam_r() can fail with ERANGE if the provided buffer isn't large
enough to hold the list of members

use getgrnam() instead which doesn't take an input buffer, but returns a
pointer to the group. this function isn't thread-safe, but we shouldn't
expect global_init() to race with itself or changes to the locale

Fixes: https://tracker.ceph.com/issues/40692

Signed-off-by: Casey Bodley <[email protected]>
@cbodley

cbodley commented Oct 3, 2024

Copy link
Copy Markdown
Contributor Author

see #60095

@cbodley cbodley closed this Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant