Skip to content

Commit

Permalink
fuse: handle failure to get gids gracefully
Browse files Browse the repository at this point in the history
If by any chance we fail to handle "/proc/$pid/status" file,
there was a crash which used to happen.

With this patch, that error is gracefully handled with a single group
added as root by default.

Updates: gluster#2467
Change-Id: I897a8f954deecabc48598dce03806154c7c1d189
Signed-off-by: Amar Tumballi <[email protected]>
  • Loading branch information
amarts committed May 24, 2021
1 parent 634db84 commit d7b5a74
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions xlators/mount/fuse/src/fuse-helpers.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,9 @@ frame_fill_groups(call_frame_t *frame)
if (!fp) {
gf_log(this->name, GF_LOG_ERROR, "failed to open %s: %s", filename,
strerror(errno));
frame->root->groups = frame->root->groups_small;
frame->root->ngrps = 1; /* Failed to get details, use 'root' */
frame->root->groups[0] = 0;
goto out;
}

Expand Down

0 comments on commit d7b5a74

Please sign in to comment.