Skip to content

Commit

Permalink
Merge pull request #50 from nirs/getgrnam
Browse files Browse the repository at this point in the history
Fix incorrect getgrnam error handling
  • Loading branch information
AkihiroSuda authored Sep 18, 2024
2 parents 26c56cb + 74644f8 commit 3771e2b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,7 @@ static int socket_bindlisten(const char *socket_path,
goto err;
}
if (socket_group != NULL) {
errno = 0;
struct group *grp = getgrnam(socket_group); /* Do not free */
if (grp == NULL) {
if (errno != 0)
Expand Down

0 comments on commit 3771e2b

Please sign in to comment.