mirror of
https://github.com/samba-team/samba.git
synced 2025-02-03 13:47:25 +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 commit is contained in:
parent
448ff58fd5
commit
b1cb7bec51
@ -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