summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2000-10-25 23:32:12 +0000
committerJeremy Allison <jra@samba.org>2000-10-25 23:32:12 +0000
commitf3a20ba1f328d701749073c6595c3552fc6dc40c (patch)
treea265e4593fe22f1a617772e5c66efa5f8cfca77f
parent0b0681388d1bc2eab5daef9993ccd564825f5b9e (diff)
downloadsamba-f3a20ba1f328d701749073c6595c3552fc6dc40c.tar.gz
samba-f3a20ba1f328d701749073c6595c3552fc6dc40c.tar.xz
samba-f3a20ba1f328d701749073c6595c3552fc6dc40c.zip
Even when looking up a users groups via winbindd even if the lookup for
the list of groups a user is in succeeds via winbind, we must allow the lookup of the group name -> gid we are checking if the user is a member of to go via winbind or /etc/group - as it may be a group on the local box we are checking against. This is a subtle one..... Jeremy. (This used to be commit 4ffda462b97e4f35c6d050c579dfe3e3b64e2c9f)
-rw-r--r--source3/lib/username.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/lib/username.c b/source3/lib/username.c
index 2cf45c2a966..0665e3db795 100644
--- a/source3/lib/username.c
+++ b/source3/lib/username.c
@@ -298,10 +298,10 @@ failed with error %s\n", strerror(errno) ));
/*
* Now we have the gid list for this user - convert the gname
- * to a gid_t via winbind and do the comparison.
+ * to a gid_t via either winbind or the local UNIX lookup and do the comparison.
*/
- if (!winbind_nametogid(&gid, gname)) {
+ if ((gid = nametogid(gname)) == (gid_t)-1) {
DEBUG(0,("user_in_winbind_group_list: winbind_lookup_name for group %s failed.\n",
gname ));
goto err;