diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/lib/username.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source3/lib/username.c b/source3/lib/username.c index 7baf3618b9..ad44c0c544 100644 --- a/source3/lib/username.c +++ b/source3/lib/username.c @@ -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; |