Skip to content

Commit

Permalink
Merge pull request #4610 from kmk3/fix-misc-get-group-id
Browse files Browse the repository at this point in the history
Fix misc in get_group_id
  • Loading branch information
smitsohu committed Oct 17, 2021
2 parents 7adbe5f + d1cfa2b commit 57b9ff0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/firejail/firejail.h
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ void update_map(char *mapping, char *map_file);
void wait_for_other(int fd);
void notify_other(int fd);
uid_t pid_get_uid(pid_t pid);
uid_t get_group_id(const char *group);
gid_t get_group_id(const char *groupname);
void flush_stdin(void);
int create_empty_dir_as_user(const char *dir, mode_t mode);
void create_empty_dir_as_root(const char *dir, mode_t mode);
Expand Down
5 changes: 2 additions & 3 deletions src/firejail/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -959,10 +959,9 @@ uid_t pid_get_uid(pid_t pid) {
}


uid_t get_group_id(const char *group) {
// find tty group id
gid_t get_group_id(const char *groupname) {
gid_t gid = 0;
struct group *g = getgrnam(group);
struct group *g = getgrnam(groupname);
if (g)
gid = g->gr_gid;

Expand Down

0 comments on commit 57b9ff0

Please sign in to comment.