Changeset 335 for branches/samba-3.2.x/source/winbindd
- Timestamp:
- Sep 24, 2009, 9:15:13 AM (16 years ago)
- Location:
- branches/samba-3.2.x/source/winbindd
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.2.x/source/winbindd/idmap_ldap.c
r233 r335 894 894 struct idmap_ldap_context *ctx; 895 895 LDAPMessage *result = NULL; 896 LDAPMessage *entry = NULL; 896 897 const char *uidNumber; 897 898 const char *gidNumber; … … 989 990 990 991 for (i = 0; i < count; i++) { 991 LDAPMessage *entry = NULL;992 992 char *sidstr = NULL; 993 993 char *tmp = NULL; -
branches/samba-3.2.x/source/winbindd/winbindd_ads.c
r228 r335 1120 1120 /* handle sids not resolved from cache by lsa_lookup_sids */ 1121 1121 if (num_nocache > 0) { 1122 unsigned int orig_timeout; 1122 1123 1123 1124 status = cm_connect_lsa(domain, tmp_ctx, &cli, &lsa_policy); … … 1126 1127 goto done; 1127 1128 } 1129 1130 /* 1131 * This call can take a long time 1132 * allow the server to time out. 1133 * 35 seconds should do it. 1134 */ 1135 orig_timeout = cli_set_timeout(cli->cli, 35000); 1128 1136 1129 1137 status = rpccli_lsa_lookup_sids(cli, tmp_ctx, … … 1135 1143 &name_types_nocache); 1136 1144 1145 /* And restore our original timeout. */ 1146 cli_set_timeout(cli->cli, orig_timeout); 1147 1137 1148 if (!(NT_STATUS_IS_OK(status) || 1138 1149 NT_STATUS_EQUAL(status, STATUS_SOME_UNMAPPED) || … … 1148 1159 goto done; 1149 1160 } 1161 1162 /* 1163 * This call can take a long time 1164 * allow the server to time out. 1165 * 35 seconds should do it. 1166 */ 1167 orig_timeout = cli_set_timeout(cli->cli, 35000); 1150 1168 1151 1169 status = rpccli_lsa_lookup_sids(cli, tmp_ctx, … … 1156 1174 &names_nocache, 1157 1175 &name_types_nocache); 1176 1177 /* And restore our original timeout. */ 1178 cli_set_timeout(cli->cli, orig_timeout); 1158 1179 } 1159 1180 -
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)) { -
branches/samba-3.2.x/source/winbindd/winbindd_sid.c
r133 r335 94 94 name_domain = state->request.data.name.name; 95 95 name_user = p+1; 96 } else if ((p = strchr(state->request.data.name.name, '@')) != NULL) { 97 name_domain = p + 1; 98 *p = 0; 99 name_user = state->request.data.name.name; 96 100 } else { 97 101 name_domain = state->request.data.name.dom_name; -
branches/samba-3.2.x/source/winbindd/winbindd_util.c
r232 r335 1103 1103 fstrcpy(domain, lp_workgroup()); 1104 1104 } else if ((p = strchr(domuser, '@')) != NULL) { 1105 fstrcpy(domain, ""); 1105 fstrcpy(domain, p + 1); 1106 user[PTR_DIFF(p, domuser)] = 0; 1106 1107 } else { 1107 1108 return False;
Note:
See TracChangeset
for help on using the changeset viewer.