summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorDan Sledz <dan.sledz@isilon.com>2009-03-11 23:27:01 +0000
committerTim Prouty <tprouty@samba.org>2009-03-12 13:00:47 -0700
commitb6616ca8dc263da648b980ed7f18d88f850293d0 (patch)
tree7bc46426d79f958401e00b70ba56f90ffec6b276 /source3
parenta84f939f4f90b829515808eed203cc6a32b4d8ae (diff)
downloadsamba-b6616ca8dc263da648b980ed7f18d88f850293d0.tar.gz
samba-b6616ca8dc263da648b980ed7f18d88f850293d0.tar.bz2
samba-b6616ca8dc263da648b980ed7f18d88f850293d0.zip
s3 pdb_wbc_sam: LookupRids should return sAMAccountName, not NT4 names
Also fix an incorrect TALLOC_FREE
Diffstat (limited to 'source3')
-rw-r--r--source3/passdb/pdb_wbc_sam.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/source3/passdb/pdb_wbc_sam.c b/source3/passdb/pdb_wbc_sam.c
index d2c7fda293..e8116d0995 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;
}