git.samba.org
/
ira
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9393207
)
Turns out we do need the pwnam check as on many systems the users
author
Jeremy Allison
<jra@samba.org>
Wed, 11 Oct 2000 22:38:38 +0000
(22:38 +0000)
committer
Jeremy Allison
<jra@samba.org>
Wed, 11 Oct 2000 22:38:38 +0000
(22:38 +0000)
primary group is not listed in the groups file...
Jeremy.
(This used to be commit
b1cb7bec51963ac2ddc62dd1abbf8f8fa4351f9b
)
source3/lib/username.c
patch
|
blob
|
history
diff --git
a/source3/lib/username.c
b/source3/lib/username.c
index 7baf3618b931dd0dd3b69696aee8af0c479a282d..ad44c0c5444f4dc164b9b24c725a343e7f04f832 100644
(file)
--- 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;