summaryrefslogtreecommitdiff
path: root/source3/lib/util_getent.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2002-01-27 12:12:22 +0000
committerAndrew Bartlett <abartlet@samba.org>2002-01-27 12:12:22 +0000
commit7b671e34f599b9d27c615c1be35db4ae10ce6481 (patch)
tree6695be8dfea1451944f0b5af2a8b0170aecbdf30 /source3/lib/util_getent.c
parent184cc84adab4ead8fde1b79c449ef47f23567165 (diff)
downloadsamba-7b671e34f599b9d27c615c1be35db4ae10ce6481.tar.gz
samba-7b671e34f599b9d27c615c1be35db4ae10ce6481.tar.bz2
samba-7b671e34f599b9d27c615c1be35db4ae10ce6481.zip
Some more 'winbind default domain' support patches from Alexander Bokovoy
<a.bokovoy@sam-solutions.net>. This patch is designed to remove the 'special cases' required for this support. In particular this now kills off winbind_initgroups, as it appears no longer to be required. Andrew Bartlett (This used to be commit f1d8d509766e9169d39332559162cfec249bfc70)
Diffstat (limited to 'source3/lib/util_getent.c')
-rw-r--r--source3/lib/util_getent.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source3/lib/util_getent.c b/source3/lib/util_getent.c
index 02be8e7c25..5fb24d9869 100644
--- a/source3/lib/util_getent.c
+++ b/source3/lib/util_getent.c
@@ -273,6 +273,12 @@ struct sys_userlist *get_users_in_group(const char *gname)
{
struct sys_userlist *list_head = NULL;
struct group *gptr;
+ fstring domain;
+ fstring groupname;
+ DOM_SID sid;
+ enum SID_NAME_USE name_type;
+
+ (void) split_domain_and_name(gname, domain, groupname);
/*
* If we're doing this via winbindd, don't do the
@@ -280,7 +286,7 @@ struct sys_userlist *get_users_in_group(const char *gname)
* pointless (and slow).
*/
- if (strchr(gname,*lp_winbind_separator()) || lp_winbind_use_default_domain()) {
+ if (winbind_lookup_name(domain, groupname, &sid, &name_type) && name_type == SID_NAME_DOM_GRP) {
if ((gptr = (struct group *)getgrnam(gname)) == NULL)
return NULL;
return add_members_to_userlist(list_head, gptr);