diff options
author | Günther Deschner <gd@samba.org> | 2008-04-03 00:23:50 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2008-04-03 00:27:02 +0200 |
commit | dc2274819ea8888c6cdcdebaff56e43c3b09ba71 (patch) | |
tree | 6d07ff32e4cb6eb7fe3cdbe352fcb85e4d3d5488 /source3 | |
parent | b028fd3f8c99e6d36237f5a312fd0bc800b38edd (diff) | |
download | samba-dc2274819ea8888c6cdcdebaff56e43c3b09ba71.tar.gz samba-dc2274819ea8888c6cdcdebaff56e43c3b09ba71.tar.bz2 samba-dc2274819ea8888c6cdcdebaff56e43c3b09ba71.zip |
Fix rpccli_lsa_lookup_sids_noalloc.
When looking up e.g. a trusted doamin account, there is just no name.
Michael, please check.
Guenther
(This used to be commit ea3cfadc2504c891b4784719bd8e6debcc38c879)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/rpc_client/cli_lsarpc.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/source3/rpc_client/cli_lsarpc.c b/source3/rpc_client/cli_lsarpc.c index 3d57e22f42..37387a04dd 100644 --- a/source3/rpc_client/cli_lsarpc.c +++ b/source3/rpc_client/cli_lsarpc.c @@ -203,11 +203,19 @@ static NTSTATUS rpccli_lsa_lookup_sids_noalloc(struct rpc_pipe_client *cli, dom_name = ref_domains->domains[dom_idx].name.string; name = lsa_names.names[i].name.string; - (names)[i] = talloc_strdup(mem_ctx, name); + if (name) { + (names)[i] = talloc_strdup(mem_ctx, name); + if ((names)[i] == NULL) { + DEBUG(0, ("cli_lsa_lookup_sids_noalloc(): out of memory\n")); + result = NT_STATUS_UNSUCCESSFUL; + goto done; + } + } else { + (names)[i] = NULL; + } (domains)[i] = talloc_strdup(mem_ctx, dom_name); (types)[i] = lsa_names.names[i].sid_type; - - if (((names)[i] == NULL) || ((domains)[i] == NULL)) { + if (((domains)[i] == NULL)) { DEBUG(0, ("cli_lsa_lookup_sids_noalloc(): out of memory\n")); result = NT_STATUS_UNSUCCESSFUL; goto done; |