summaryrefslogtreecommitdiff
path: root/source3/passdb/pdb_wbc_sam.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2009-03-20 01:30:36 +0100
committerJelmer Vernooij <jelmer@samba.org>2009-03-20 01:30:36 +0100
commit5fe2b28f45289dc5578cdd536600f0d30a14d820 (patch)
tree4bdf36d0d4d8bdddcb3d618b4b01839370ed57c3 /source3/passdb/pdb_wbc_sam.c
parentec9aeeab00584f4d3dfe9afb83dc1a77b8463b81 (diff)
parent3a4638db0351368d3b148bf547546f28fa0b1479 (diff)
downloadsamba-5fe2b28f45289dc5578cdd536600f0d30a14d820.tar.gz
samba-5fe2b28f45289dc5578cdd536600f0d30a14d820.tar.bz2
samba-5fe2b28f45289dc5578cdd536600f0d30a14d820.zip
Merge branch 'master' of git://git.samba.org/samba into minschema
Diffstat (limited to 'source3/passdb/pdb_wbc_sam.c')
-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;
}