Revert "winbindd: Fix crash in cm_connect_sam()"
authorKarolin Seeger <kseeger@samba.org>
Wed, 27 Aug 2008 08:36:00 +0000 (10:36 +0200)
committerKarolin Seeger <kseeger@samba.org>
Wed, 27 Aug 2008 08:36:00 +0000 (10:36 +0200)
This reverts commit 9bbd6ee5db03747499bd263bb1365c8cd352076d.

source/winbindd/winbindd_cm.c

index ab8287a01a170f68fd419171e9a9d1e1ef7552ef..c9769bfdca8f045e86870caff660654401f4c573 100644 (file)
@@ -846,7 +846,7 @@ static NTSTATUS cm_prepare_connection(const struct winbindd_domain *domain,
                        result = ads_ntstatus(ads_status);
                        if (NT_STATUS_IS_OK(result)) {
                                /* Ensure creds are stored for NTLMSSP authenticated pipe access. */
-                               cli_init_creds(*cli, machine_account, lp_workgroup(), machine_password);
+                               cli_init_creds(*cli, machine_account, domain->name, machine_password);
                                goto session_setup_done;
                        }
                }
@@ -871,7 +871,7 @@ static NTSTATUS cm_prepare_connection(const struct winbindd_domain *domain,
                result = ads_ntstatus(ads_status);
                if (NT_STATUS_IS_OK(result)) {
                        /* Ensure creds are stored for NTLMSSP authenticated pipe access. */
-                       cli_init_creds(*cli, machine_account, lp_workgroup(), machine_password);
+                       cli_init_creds(*cli, machine_account, domain->name, machine_password);
                        goto session_setup_done;
                }
        }
@@ -1900,10 +1900,6 @@ static bool cm_get_schannel_dcinfo(struct winbindd_domain *domain,
        /* Return a pointer to the struct dcinfo from the
           netlogon pipe. */
 
-       if (!domain->conn.netlogon_pipe->dc) {
-               return false;
-       }
-
        *ppdc = domain->conn.netlogon_pipe->dc;
        return True;
 }
@@ -1930,7 +1926,6 @@ NTSTATUS cm_connect_sam(struct winbindd_domain *domain, TALLOC_CTX *mem_ctx,
                goto done;
        }
 
-
        /*
         * No SAMR pipe yet. Attempt to get an NTLMSSP SPNEGO authenticated
         * sign and sealed pipe using the machine account password by