The branch, master has been updated
       via  b6616ca8dc263da648b980ed7f18d88f850293d0 (commit)
      from  a84f939f4f90b829515808eed203cc6a32b4d8ae (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit b6616ca8dc263da648b980ed7f18d88f850293d0
Author: Dan Sledz <[email protected]>
Date:   Wed Mar 11 23:27:01 2009 +0000

    s3 pdb_wbc_sam: LookupRids should return sAMAccountName, not NT4 names
    
    Also fix an incorrect TALLOC_FREE

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

Summary of changes:
 source3/passdb/pdb_wbc_sam.c |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/passdb/pdb_wbc_sam.c b/source3/passdb/pdb_wbc_sam.c
index d2c7fda..e8116d0 100644
--- a/source3/passdb/pdb_wbc_sam.c
+++ b/source3/passdb/pdb_wbc_sam.c
@@ -150,7 +150,6 @@ static NTSTATUS pdb_wbc_sam_lookup_rids(struct pdb_methods 
*methods,
        NTSTATUS result = NT_STATUS_OK;
        char *domain = NULL;
        char **account_names = NULL;
-       char name[256];
        enum lsa_SidType *attr_list = NULL;
        int i;
 
@@ -168,16 +167,19 @@ static NTSTATUS pdb_wbc_sam_lookup_rids(struct 
pdb_methods *methods,
                if (attrs[i] == SID_NAME_UNKNOWN) {
                        names[i] = NULL;
                } else {
-                       snprintf(name, sizeof(name), "%s%c%s", domain,
-                                *lp_winbind_separator(), account_names[i]);
-                       names[i] = talloc_strdup(names, name);
+                       names[i] = talloc_strdup(names, account_names[i]);
+                       if (names[i] == NULL) {
+                               result = NT_STATUS_NO_MEMORY;
+                               goto done;
+                       }
+
                }
        }
 
 done:
        TALLOC_FREE(account_names);
        TALLOC_FREE(domain);
-       TALLOC_FREE(attrs);
+       TALLOC_FREE(attr_list);
        return result;
 }
 


-- 
Samba Shared Repository

Reply via email to