mirror of
https://github.com/samba-team/samba.git
synced 2025-03-10 12:58:35 +03:00
s3: Fix crash in winbindd;(bug#6879).
Signed-off-by: Bo Yang <boyang@samba.org>
This commit is contained in:
parent
dfcc4115dd
commit
cdb68bd2b6
@ -1281,8 +1281,12 @@ NTSTATUS winbindd_lookup_names(TALLOC_CTX *mem_ctx,
|
|||||||
* This call can take a long time
|
* This call can take a long time
|
||||||
* allow the server to time out.
|
* allow the server to time out.
|
||||||
* 35 seconds should do it.
|
* 35 seconds should do it.
|
||||||
|
* NB
|
||||||
|
* only do this when the undelying transport is named pipe.
|
||||||
*/
|
*/
|
||||||
orig_timeout = rpccli_set_timeout(cli, 35000);
|
if (cli->transport->transport == NCACN_NP) {
|
||||||
|
orig_timeout = rpccli_set_timeout(cli, 35000);
|
||||||
|
}
|
||||||
|
|
||||||
status = lookup_names_fn(cli,
|
status = lookup_names_fn(cli,
|
||||||
mem_ctx,
|
mem_ctx,
|
||||||
@ -1295,7 +1299,9 @@ NTSTATUS winbindd_lookup_names(TALLOC_CTX *mem_ctx,
|
|||||||
types);
|
types);
|
||||||
|
|
||||||
/* And restore our original timeout. */
|
/* And restore our original timeout. */
|
||||||
rpccli_set_timeout(cli, orig_timeout);
|
if (cli->transport->transport == NCACN_NP) {
|
||||||
|
rpccli_set_timeout(cli, orig_timeout);
|
||||||
|
}
|
||||||
|
|
||||||
if (!NT_STATUS_IS_OK(status)) {
|
if (!NT_STATUS_IS_OK(status)) {
|
||||||
return status;
|
return status;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user