s3-winbindd: Fix Bug #6700: Use dns domain name when needing to guess server principal.
[ira/wip.git] / source3 / winbindd / winbindd_cm.c
index 44924a63035b6fb752ecd1b54245686a6c3a8476..50742c171537f245bd5bd5a1c8375443270c816e 100644 (file)
@@ -864,7 +864,7 @@ static NTSTATUS cm_prepare_connection(const struct winbindd_domain *domain,
                                                              machine_krb5_principal, 
                                                              machine_password,
                                                              lp_workgroup(),
-                                                             domain->name);
+                                                             domain->alt_name);
 
                        if (!ADS_ERR_OK(ads_status)) {
                                DEBUG(4,("failed kerberos session setup with %s\n",