diff options
author | Bo Yang <boyang@samba.org> | 2009-12-04 12:53:38 +0800 |
---|---|---|
committer | Bo Yang <boyang@samba.org> | 2009-12-03 12:54:19 +0800 |
commit | cdb68bd2b61147df77b7f2de3fb4e29be07e7bd9 (patch) | |
tree | 6cfaabc3c44c8fc8d9b6b21766affb821a905b99 /source3/winbindd | |
parent | dfcc4115ddc7c3bf7a69d7eb747c096cd217b8a6 (diff) | |
download | samba-cdb68bd2b61147df77b7f2de3fb4e29be07e7bd9.tar.gz samba-cdb68bd2b61147df77b7f2de3fb4e29be07e7bd9.tar.bz2 samba-cdb68bd2b61147df77b7f2de3fb4e29be07e7bd9.zip |
s3: Fix crash in winbindd;(bug#6879).
Signed-off-by: Bo Yang <boyang@samba.org>
Diffstat (limited to 'source3/winbindd')
-rw-r--r-- | source3/winbindd/winbindd_rpc.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/source3/winbindd/winbindd_rpc.c b/source3/winbindd/winbindd_rpc.c index b926370722..1018a2952b 100644 --- a/source3/winbindd/winbindd_rpc.c +++ b/source3/winbindd/winbindd_rpc.c @@ -1281,8 +1281,12 @@ NTSTATUS winbindd_lookup_names(TALLOC_CTX *mem_ctx, * This call can take a long time * allow the server to time out. * 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, mem_ctx, @@ -1295,7 +1299,9 @@ NTSTATUS winbindd_lookup_names(TALLOC_CTX *mem_ctx, types); /* 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)) { return status; |