mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-31 14:25:15 +00:00
Add support to user_in_group() for treating group names that begin with
a '#' as gids.
This commit is contained in:
@@ -652,7 +652,9 @@ user_in_group(struct passwd *pw, const char *group)
|
||||
#ifdef HAVE_SETAUTHDB
|
||||
aix_setauthdb(pw->pw_name);
|
||||
#endif
|
||||
grp = sudo_getgrnam(group);
|
||||
/* A group name that begins with a '#' may be a gid. */
|
||||
if ((grp = sudo_getgrnam(group)) == NULL && *group == '#')
|
||||
grp = sudo_getgrgid(atoi(group + 1));
|
||||
#ifdef HAVE_SETAUTHDB
|
||||
aix_restoreauthdb();
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user