Changeset 335 for branches/samba-3.2.x/source/winbindd/winbindd_rpc.c
- Timestamp:
- Sep 24, 2009, 9:15:13 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.2.x/source/winbindd/winbindd_rpc.c
r233 r335 280 280 struct rpc_pipe_client *cli; 281 281 POLICY_HND lsa_policy; 282 unsigned int orig_timeout; 282 283 283 284 if (name == NULL || *name=='\0') { … … 303 304 return result; 304 305 306 /* 307 * This call can take a long time 308 * allow the server to time out. 309 * 35 seconds should do it. 310 */ 311 orig_timeout = cli_set_timeout(cli->cli, 35000); 312 305 313 result = rpccli_lsa_lookup_names(cli, mem_ctx, &lsa_policy, 1, 306 314 (const char**) &full_name, NULL, 1, &sids, &types); 307 315 316 /* And restore our original timeout. */ 317 cli_set_timeout(cli->cli, orig_timeout); 318 308 319 if (!NT_STATUS_IS_OK(result)) 309 320 return result; … … 333 344 struct rpc_pipe_client *cli; 334 345 POLICY_HND lsa_policy; 346 unsigned int orig_timeout; 335 347 336 348 DEBUG(3,("sid_to_name [rpc] %s for domain %s\n", sid_string_dbg(sid), … … 345 357 346 358 359 /* 360 * This call can take a long time 361 * allow the server to time out. 362 * 35 seconds should do it. 363 */ 364 orig_timeout = cli_set_timeout(cli->cli, 35000); 365 347 366 result = rpccli_lsa_lookup_sids(cli, mem_ctx, &lsa_policy, 348 367 1, sid, &domains, &names, &types); 368 369 /* And restore our original timeout. */ 370 cli_set_timeout(cli->cli, orig_timeout); 371 349 372 if (!NT_STATUS_IS_OK(result)) { 350 373 DEBUG(2,("msrpc_sid_to_name: rpccli_lsa_lookup_sids() failed (%s)\n", … … 379 402 size_t i; 380 403 char **ret_names; 404 unsigned int orig_timeout; 381 405 382 406 DEBUG(3, ("rids_to_names [rpc] for domain %s\n", domain->name )); … … 402 426 } 403 427 428 /* 429 * This call can take a long time 430 * allow the server to time out. 431 * 35 seconds should do it. 432 */ 433 orig_timeout = cli_set_timeout(cli->cli, 35000); 434 404 435 result = rpccli_lsa_lookup_sids(cli, mem_ctx, &lsa_policy, 405 436 num_rids, sids, &domains, 406 437 names, types); 438 439 /* And restore our original timeout. */ 440 cli_set_timeout(cli->cli, orig_timeout); 441 407 442 if (!NT_STATUS_IS_OK(result) && 408 443 !NT_STATUS_EQUAL(result, STATUS_SOME_UNMAPPED)) {
Note:
See TracChangeset
for help on using the changeset viewer.