diff options
author | Günther Deschner <gd@samba.org> | 2008-09-02 21:51:30 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2008-09-02 21:53:04 +0200 |
commit | aac60fead2d3a07756c320ee09a0960252510c19 (patch) | |
tree | 5420a264673b18e1af4c3acf02c0885d7b4047f8 /source3/winbindd | |
parent | c97880e979d49e0afca8ad0d2e2362e24ca0cfde (diff) | |
download | samba-aac60fead2d3a07756c320ee09a0960252510c19.tar.gz samba-aac60fead2d3a07756c320ee09a0960252510c19.tar.bz2 samba-aac60fead2d3a07756c320ee09a0960252510c19.zip |
winbindd: the ad trusted_domains call should return talloced strings.
Guenther
(This used to be commit b57cbf62e8180c8fdb8f541c43358d36d8dbbdfa)
Diffstat (limited to 'source3/winbindd')
-rw-r--r-- | source3/winbindd/winbindd_ads.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source3/winbindd/winbindd_ads.c b/source3/winbindd/winbindd_ads.c index 53ea3e148c..94e3bad7b2 100644 --- a/source3/winbindd/winbindd_ads.c +++ b/source3/winbindd/winbindd_ads.c @@ -1239,8 +1239,11 @@ static NTSTATUS trusted_domains(struct winbindd_domain *domain, continue; } - (*names)[ret_count] = CONST_DISCARD(char *, trusts.array[i].netbios_name); - (*alt_names)[ret_count] = CONST_DISCARD(char *, trusts.array[i].dns_name); + (*names)[ret_count] = talloc_strdup(mem_ctx, trusts.array[i].netbios_name); + (*alt_names)[ret_count] = talloc_strdup(mem_ctx, trusts.array[i].dns_name); + if ((*names)[ret_count] == NULL) { + return NT_STATUS_NO_MEMORY; + } if (trusts.array[i].sid) { sid_copy(&(*dom_sids)[ret_count], trusts.array[i].sid); } else { |