summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/winbindd/winbindd_group.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/source3/winbindd/winbindd_group.c b/source3/winbindd/winbindd_group.c
index bc532bbce7..48e6577902 100644
--- a/source3/winbindd/winbindd_group.c
+++ b/source3/winbindd/winbindd_group.c
@@ -1306,6 +1306,7 @@ void winbindd_getgrent(struct winbindd_cli_state *state)
char *gr_mem;
DOM_SID group_sid;
struct winbindd_domain *domain;
+ char *domain_name_idmap;
/* Do we need to fetch another chunk of groups? */
@@ -1353,8 +1354,13 @@ void winbindd_getgrent(struct winbindd_cli_state *state)
sid_copy(&group_sid, &domain->sid);
sid_append_rid(&group_sid, name_list[ent->sam_entry_index].rid);
- if (!NT_STATUS_IS_OK(idmap_sid_to_gid(domain->name, &group_sid,
- &group_gid))) {
+ domain_name_idmap = domain->have_idmap_config
+ ? domain->name
+ : "";
+
+ if (!NT_STATUS_IS_OK(idmap_sid_to_gid(domain_name_idmap,
+ &group_sid, &group_gid)))
+ {
union unid_t id;
enum lsa_SidType type;