summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-12-17 13:33:43 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:29:25 -0500
commitf767a508a68e7308e0fba638626b67615a3ce2e9 (patch)
tree1b4d308c012463bdd93b46c590c093591e9c46ee
parent836202f6008de333f22635b3badef328629fab88 (diff)
downloadsamba-f767a508a68e7308e0fba638626b67615a3ce2e9.tar.gz
samba-f767a508a68e7308e0fba638626b67615a3ce2e9.tar.bz2
samba-f767a508a68e7308e0fba638626b67615a3ce2e9.zip
r20225: we can't use composite_error() in a _recv() function, as that would
trigger the caller to call the _recv() function again and will be an endless loop. this is just a fix the to prevent this, and use a more usefull error code than NT_STATUS_UNSUCCESSFUL I think we should move the checks about valid responses into the function which receives the the response (here continue_name_found()), so that the _recv() function only needs to transfer the output vars to the caller without any logic to analyse the network response. metze (This used to be commit c02048f4800fe14e975f1cf0b5bd45f14261ac18)
-rw-r--r--source4/libnet/libnet_lookup.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source4/libnet/libnet_lookup.c b/source4/libnet/libnet_lookup.c
index e8bceb9218..d194c1a73c 100644
--- a/source4/libnet/libnet_lookup.c
+++ b/source4/libnet/libnet_lookup.c
@@ -419,7 +419,9 @@ NTSTATUS libnet_LookupName_recv(struct composite_context *c, TALLOC_CTX *mem_ctx
struct lsa_TransSidArray *sids = s->lookup.out.sids;
if (domains == NULL || sids == NULL) {
- composite_error(c, NT_STATUS_UNSUCCESSFUL);
+ status = NT_STATUS_UNSUCCESSFUL;
+ io->out.error_string = talloc_asprintf(mem_ctx, "Error: %s", nt_errstr(status));
+ goto done;
}
if (sids->count > 0) {
@@ -440,6 +442,7 @@ NTSTATUS libnet_LookupName_recv(struct composite_context *c, TALLOC_CTX *mem_ctx
io->out.error_string = talloc_asprintf(mem_ctx, "Error: %s", nt_errstr(status));
}
+done:
talloc_free(c);
return status;
}