[PR #609] [MERGED] Group permission checks sometimes fail with large number of groups #1571

Closed
opened 2026-03-04 02:01:07 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/s3fs-fuse/s3fs-fuse/pull/609
Author: @tlevi
Created: 5/25/2017
Status: Merged
Merged: 5/27/2017
Merged by: @ggtakec

Base: masterHead: getgrgid_r


📝 Commits (1)

  • 2b7ea58 Expand buffer for group information if too small and retry

📊 Changes

1 file changed (+11 additions, -2 deletions)

View changed files

📝 src/s3fs_util.cpp (+11 -2)

📄 Description

(Same as #605 with different branch)
On some of my systems users cannot access directories, which they have group membership to access.
One if the groups in particular is quite large, with about 50 members, but I've also got ~150 groups and users in total.

I've traced the issue back to the getgrgid_r call within is_uid_include_group failing with ERANGE, indicating the buffer is too small.
The patch in this pull request solves the problem by expanding the buffer and trying again until it works, but there might be a better way.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/s3fs-fuse/s3fs-fuse/pull/609 **Author:** [@tlevi](https://github.com/tlevi) **Created:** 5/25/2017 **Status:** ✅ Merged **Merged:** 5/27/2017 **Merged by:** [@ggtakec](https://github.com/ggtakec) **Base:** `master` ← **Head:** `getgrgid_r` --- ### 📝 Commits (1) - [`2b7ea58`](https://github.com/s3fs-fuse/s3fs-fuse/commit/2b7ea5813c39ea51b6f32c2f8997b2c95da64eb9) Expand buffer for group information if too small and retry ### 📊 Changes **1 file changed** (+11 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `src/s3fs_util.cpp` (+11 -2) </details> ### 📄 Description (Same as #605 with different branch) On some of my systems users cannot access directories, which they have group membership to access. One if the groups in particular is quite large, with about 50 members, but I've also got ~150 groups and users in total. I've traced the issue back to the getgrgid_r call within is_uid_include_group failing with ERANGE, indicating the buffer is too small. The patch in this pull request solves the problem by expanding the buffer and trying again until it works, but there might be a better way. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-04 02:01:07 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/s3fs-fuse#1571
No description provided.