Changeset 596 for trunk/server/source3/winbindd/winbindd_cm.c
- Timestamp:
- Jul 2, 2011, 3:35:33 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/server/source3/winbindd/winbindd_cm.c
r590 r596 836 836 } 837 837 838 if (ntohs(peeraddr_in->sin_port) == 139) {839 struct nmb_name calling;840 struct nmb_name called;841 842 make_nmb_name(&calling, global_myname(), 0x0);843 make_nmb_name(&called, "*SMBSERVER", 0x20);844 845 if (!cli_session_request(*cli, &calling, &called)) {846 DEBUG(8, ("cli_session_request failed for %s\n",847 controller));848 result = NT_STATUS_UNSUCCESSFUL;849 goto done;850 }851 }852 853 838 result = cli_negprot(*cli); 854 839 … … 1355 1340 int num_addrs = 0; 1356 1341 1357 int i, fd_index; 1342 int i; 1343 size_t fd_index; 1344 1345 NTSTATUS status; 1358 1346 1359 1347 *fd = -1; … … 1373 1361 return False; 1374 1362 } 1375 1376 if (!add_string_to_array(mem_ctx, dcs[i].name,1377 &dcnames, &num_dcnames)) {1378 return False;1379 }1380 if (!add_sockaddr_to_array(mem_ctx, &dcs[i].ss, 139,1381 &addrs, &num_addrs)) {1382 return False;1383 }1384 1363 } 1385 1364 … … 1390 1369 return False; 1391 1370 1392 /* 5 second timeout. */ 1393 if (!open_any_socket_out(addrs, num_addrs, 5000, &fd_index, fd) ) { 1371 status = smbsock_any_connect(addrs, dcnames, num_addrs, 1372 fd, &fd_index, NULL); 1373 if (!NT_STATUS_IS_OK(status)) { 1394 1374 for (i=0; i<num_dcs; i++) { 1395 1375 char ab[INET6_ADDRSTRLEN]; 1396 1376 print_sockaddr(ab, sizeof(ab), &dcs[i].ss); 1397 DEBUG(10, ("find_new_dc: open_any_socket_out failed for "1377 DEBUG(10, ("find_new_dc: smbsock_any_connect failed for " 1398 1378 "domain %s address %s. Error was %s\n", 1399 domain->name, ab, strerror(errno) ));1379 domain->name, ab, nt_errstr(status) )); 1400 1380 winbind_add_failed_connection_entry(domain, 1401 1381 dcs[i].name, NT_STATUS_UNSUCCESSFUL); … … 1499 1479 && (resolve_name(domain->dcname, &domain->dcaddr, 0x20, true))) 1500 1480 { 1501 struct sockaddr_storage *addrs = NULL; 1502 int num_addrs = 0; 1503 int dummy = 0; 1504 1505 if (!add_sockaddr_to_array(mem_ctx, &domain->dcaddr, 445, &addrs, &num_addrs)) { 1506 set_domain_offline(domain); 1507 talloc_destroy(mem_ctx); 1508 return NT_STATUS_NO_MEMORY; 1509 } 1510 if (!add_sockaddr_to_array(mem_ctx, &domain->dcaddr, 139, &addrs, &num_addrs)) { 1511 set_domain_offline(domain); 1512 talloc_destroy(mem_ctx); 1513 return NT_STATUS_NO_MEMORY; 1514 } 1515 1516 /* 5 second timeout. */ 1517 if (!open_any_socket_out(addrs, num_addrs, 5000, &dummy, &fd)) { 1481 NTSTATUS status; 1482 1483 status = smbsock_connect(&domain->dcaddr, NULL, NULL, 1484 &fd, NULL); 1485 if (!NT_STATUS_IS_OK(status)) { 1518 1486 fd = -1; 1519 1487 } … … 1978 1946 1979 1947 domain->can_do_ncacn_ip_tcp = domain->active_directory; 1948 domain->can_do_validation6 = domain->active_directory; 1980 1949 1981 1950 TALLOC_FREE(cli);
Note:
See TracChangeset
for help on using the changeset viewer.