mirror of
https://github.com/samba-team/samba.git
synced 2025-02-05 21:57:51 +03:00
Turns out we do need the pwnam check as on many systems the users
primary group is not listed in the groups file... Jeremy. (This used to be commit b1cb7bec51963ac2ddc62dd1abbf8f8fa4351f9b)
This commit is contained in:
parent
93932079c6
commit
d81a598230
@ -267,6 +267,13 @@ static BOOL user_in_group_list(char *user,char *gname)
|
||||
{
|
||||
struct group *gptr;
|
||||
char **member;
|
||||
struct passwd *pass = Get_Pwnam(user,False);
|
||||
|
||||
if (pass) {
|
||||
gptr = getgrgid(pass->pw_gid);
|
||||
if (gptr && strequal(gptr->gr_name,gname))
|
||||
return True;
|
||||
}
|
||||
|
||||
if ((gptr = (struct group *)getgrnam(gname)) == NULL)
|
||||
return False;
|
||||
|
Loading…
x
Reference in New Issue
Block a user