The branch, v3-devel has been updated
       via  b57cbf62e8180c8fdb8f541c43358d36d8dbbdfa (commit)
      from  f5212c64d23a28fa40a14b45a8d1c0181f01a6da (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-devel


- Log -----------------------------------------------------------------
commit b57cbf62e8180c8fdb8f541c43358d36d8dbbdfa
Author: Günther Deschner <[EMAIL PROTECTED]>
Date:   Tue Sep 2 21:51:30 2008 +0200

    winbindd: the ad trusted_domains call should return talloced strings.
    
    Guenther

-----------------------------------------------------------------------

Summary of changes:
 source/winbindd/winbindd_ads.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/winbindd/winbindd_ads.c b/source/winbindd/winbindd_ads.c
index 53ea3e1..94e3bad 100644
--- a/source/winbindd/winbindd_ads.c
+++ b/source/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 {


-- 
Samba Shared Repository

Reply via email to