Ignore:
Timestamp:
Jul 2, 2011, 3:35:33 PM (14 years ago)
Author:
Herwig Bauernfeind
Message:

Samba 3.5: Update trunk to 3.5.8

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/server/source3/winbindd/winbindd_cm.c

    r590 r596  
    836836        }
    837837
    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 
    853838        result = cli_negprot(*cli);
    854839
     
    13551340        int num_addrs = 0;
    13561341
    1357         int i, fd_index;
     1342        int i;
     1343        size_t fd_index;
     1344
     1345        NTSTATUS status;
    13581346
    13591347        *fd = -1;
     
    13731361                        return False;
    13741362                }
    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                 }
    13841363        }
    13851364
     
    13901369                return False;
    13911370
    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)) {
    13941374                for (i=0; i<num_dcs; i++) {
    13951375                        char ab[INET6_ADDRSTRLEN];
    13961376                        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 "
    13981378                                "domain %s address %s. Error was %s\n",
    1399                                 domain->name, ab, strerror(errno) ));
     1379                                   domain->name, ab, nt_errstr(status) ));
    14001380                        winbind_add_failed_connection_entry(domain,
    14011381                                dcs[i].name, NT_STATUS_UNSUCCESSFUL);
     
    14991479                        && (resolve_name(domain->dcname, &domain->dcaddr, 0x20, true)))
    15001480                {
    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)) {
    15181486                                fd = -1;
    15191487                        }
     
    19781946
    19791947        domain->can_do_ncacn_ip_tcp = domain->active_directory;
     1948        domain->can_do_validation6 = domain->active_directory;
    19801949
    19811950        TALLOC_FREE(cli);
Note: See TracChangeset for help on using the changeset viewer.