mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
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 c02048f480
)
This commit is contained in:
parent
836202f600
commit
f767a508a6
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user