summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-09-22 10:39:37 +0200
committerMichael Adam <obnox@samba.org>2008-09-23 10:00:26 +0200
commit49145bfefae54672c5d4cccdbb9dd33e1cd89b88 (patch)
tree349d2c63c3faae4dfd53f52bebfeb52e139a2814
parent1f8a7739ace7715b20c9b8c72732ab1ff689b552 (diff)
downloadsamba-49145bfefae54672c5d4cccdbb9dd33e1cd89b88.tar.gz
samba-49145bfefae54672c5d4cccdbb9dd33e1cd89b88.tar.bz2
samba-49145bfefae54672c5d4cccdbb9dd33e1cd89b88.zip
[s3]winbindd_ads: honour "winbind use default domain" in lookup_groupmem().
This fixes the output of "getent group" when "winbind use default domain = yes" with security = ads. Michael
-rw-r--r--source3/winbindd/winbindd_ads.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/source3/winbindd/winbindd_ads.c b/source3/winbindd/winbindd_ads.c
index 894e7866b3..1febddf110 100644
--- a/source3/winbindd/winbindd_ads.c
+++ b/source3/winbindd/winbindd_ads.c
@@ -1023,10 +1023,11 @@ static NTSTATUS lookup_groupmem(struct winbindd_domain *domain,
DEBUG(10,("ads: lookup_groupmem: got sid %s from "
"cache\n", sid_string_dbg(&sid)));
sid_copy(&(*sid_mem)[*num_names], &sid);
- (*names)[*num_names] = talloc_asprintf(*names, "%s%c%s",
- domain_name,
- *lp_winbind_separator(),
- name );
+ (*names)[*num_names] = fill_domain_username_talloc(
+ *names,
+ domain_name,
+ name,
+ true);
(*name_types)[*num_names] = name_type;
(*num_names)++;
@@ -1071,11 +1072,12 @@ static NTSTATUS lookup_groupmem(struct winbindd_domain *domain,
{
sid_copy(&(*sid_mem)[*num_names],
&sid_mem_nocache[i]);
- (*names)[*num_names] = talloc_asprintf( *names,
- "%s%c%s",
- domains_nocache[i],
- *lp_winbind_separator(),
- names_nocache[i] );
+ (*names)[*num_names] =
+ fill_domain_username_talloc(
+ *names,
+ domains_nocache[i],
+ names_nocache[i],
+ true);
(*name_types)[*num_names] = name_types_nocache[i];
(*num_names)++;
}