Ignore:
Timestamp:
Jul 11, 2008, 1:13:42 AM (17 years ago)
Author:
Paul Smedley
Message:

Update branch to 3.0.31 release

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/samba-3.0/source/nsswitch/winbindd_cm.c

    r134 r140  
    608608        }
    609609
    610         /* this is at least correct when domain is our domain,
    611          * which is the only case, when this is currently used: */
     610        /* For now assume our machine account only exists in our domain */
     611
    612612        if (machine_krb5_principal != NULL)
    613613        {
    614614                if (asprintf(machine_krb5_principal, "%s$@%s",
    615                              account_name, domain->alt_name) == -1)
     615                             account_name, lp_realm()) == -1)
    616616                {
    617617                        return NT_STATUS_NO_MEMORY;
     
    730730                        (*cli)->use_kerberos = True;
    731731                        DEBUG(5, ("connecting to %s from %s with kerberos principal "
    732                                   "[%s]\n", controller, global_myname(),
    733                                   machine_krb5_principal));
     732                                  "[%s] and realm [%s]\n", controller, global_myname(),
     733                                  machine_krb5_principal, domain->alt_name));
    734734
    735735                        ads_status = cli_session_setup_spnego(*cli,
    736736                                                              machine_krb5_principal,
    737737                                                              machine_password,
    738                                                               domain->name);
     738                                                              lp_workgroup(),
     739                                                              domain->alt_name);
    739740
    740741                        if (!ADS_ERR_OK(ads_status)) {
     
    756757                DEBUG(5, ("connecting to %s from %s with username "
    757758                          "[%s]\\[%s]\n",  controller, global_myname(),
    758                           domain->name, machine_account));
     759                          lp_workgroup(), machine_account));
    759760
    760761                ads_status = cli_session_setup_spnego(*cli,
    761762                                                      machine_account,
    762763                                                      machine_password,
    763                                                       domain->name);
     764                                                      lp_workgroup(),
     765                                                      NULL);
    764766                if (!ADS_ERR_OK(ads_status)) {
    765767                        DEBUG(4, ("authenticated session setup failed with %s\n",
     
    12491251        int i, fd_index;
    12501252
     1253        *fd = -1;
     1254
    12511255 again:
    12521256        if (!get_dcs(mem_ctx, domain, &dcs, &num_dcs) || (num_dcs == 0))
     
    13091313        winbind_add_failed_connection_entry(domain, dcs[fd_index].name,
    13101314                                    NT_STATUS_UNSUCCESSFUL);
     1315
     1316        /* Throw away all arrays as we're doing this again. */
     1317        TALLOC_FREE(dcs);
     1318        num_dcs = 0;
     1319
     1320        TALLOC_FREE(dcnames);
     1321        num_dcnames = 0;
     1322
     1323        TALLOC_FREE(addrs);
     1324        num_addrs = 0;
     1325
     1326        *fd = -1;
     1327
    13111328        goto again;
    13121329}
Note: See TracChangeset for help on using the changeset viewer.