diff options
Diffstat (limited to 'source3/winbindd')
-rw-r--r-- | source3/winbindd/winbindd_cache.c | 1 | ||||
-rw-r--r-- | source3/winbindd/winbindd_cm.c | 19 | ||||
-rw-r--r-- | source3/winbindd/winbindd_cred_cache.c | 1 | ||||
-rw-r--r-- | source3/winbindd/winbindd_creds.c | 1 | ||||
-rw-r--r-- | source3/winbindd/winbindd_pam.c | 7 |
5 files changed, 17 insertions, 12 deletions
diff --git a/source3/winbindd/winbindd_cache.c b/source3/winbindd/winbindd_cache.c index 66166bf292..5c1b71897d 100644 --- a/source3/winbindd/winbindd_cache.c +++ b/source3/winbindd/winbindd_cache.c @@ -26,6 +26,7 @@ #include "includes.h" #include "winbindd.h" #include "tdb_validate.h" +#include "../libcli/auth/libcli_auth.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_WINBIND diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c index ed0a33a5f2..e9cf05e90b 100644 --- a/source3/winbindd/winbindd_cm.c +++ b/source3/winbindd/winbindd_cm.c @@ -60,6 +60,7 @@ #include "includes.h" #include "winbindd.h" +#include "../libcli/auth/libcli_auth.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_WINBIND @@ -1963,8 +1964,8 @@ static void set_dc_type_and_flags( struct winbindd_domain *domain ) /********************************************************************** ***********************************************************************/ -static bool cm_get_schannel_dcinfo(struct winbindd_domain *domain, - struct dcinfo **ppdc) +static bool cm_get_schannel_creds(struct winbindd_domain *domain, + struct netlogon_creds_CredentialState **ppdc) { NTSTATUS result; struct rpc_pipe_client *netlogon_pipe; @@ -1978,7 +1979,7 @@ static bool cm_get_schannel_dcinfo(struct winbindd_domain *domain, return False; } - /* Return a pointer to the struct dcinfo from the + /* Return a pointer to the struct netlogon_creds_CredentialState from the netlogon pipe. */ if (!domain->conn.netlogon_pipe->dc) { @@ -1994,7 +1995,7 @@ NTSTATUS cm_connect_sam(struct winbindd_domain *domain, TALLOC_CTX *mem_ctx, { struct winbindd_cm_conn *conn; NTSTATUS result = NT_STATUS_UNSUCCESSFUL; - struct dcinfo *p_dcinfo; + struct netlogon_creds_CredentialState *p_creds; char *machine_password = NULL; char *machine_account = NULL; char *domain_name = NULL; @@ -2081,7 +2082,7 @@ NTSTATUS cm_connect_sam(struct winbindd_domain *domain, TALLOC_CTX *mem_ctx, /* Fall back to schannel if it's a W2K pre-SP1 box. */ - if (!cm_get_schannel_dcinfo(domain, &p_dcinfo)) { + if (!cm_get_schannel_creds(domain, &p_creds)) { /* If this call fails - conn->cli can now be NULL ! */ DEBUG(10, ("cm_connect_sam: Could not get schannel auth info " "for domain %s, trying anon\n", domain->name)); @@ -2089,7 +2090,7 @@ NTSTATUS cm_connect_sam(struct winbindd_domain *domain, TALLOC_CTX *mem_ctx, } result = cli_rpc_pipe_open_schannel_with_key (conn->cli, &ndr_table_samr.syntax_id, PIPE_AUTH_LEVEL_PRIVACY, - domain->name, p_dcinfo, &conn->samr_pipe); + domain->name, &p_creds, &conn->samr_pipe); if (!NT_STATUS_IS_OK(result)) { DEBUG(10,("cm_connect_sam: failed to connect to SAMR pipe for " @@ -2160,7 +2161,7 @@ NTSTATUS cm_connect_lsa(struct winbindd_domain *domain, TALLOC_CTX *mem_ctx, { struct winbindd_cm_conn *conn; NTSTATUS result = NT_STATUS_UNSUCCESSFUL; - struct dcinfo *p_dcinfo; + struct netlogon_creds_CredentialState *p_creds; result = init_dc_connection(domain); if (!NT_STATUS_IS_OK(result)) @@ -2217,7 +2218,7 @@ NTSTATUS cm_connect_lsa(struct winbindd_domain *domain, TALLOC_CTX *mem_ctx, /* Fall back to schannel if it's a W2K pre-SP1 box. */ - if (!cm_get_schannel_dcinfo(domain, &p_dcinfo)) { + if (!cm_get_schannel_creds(domain, &p_creds)) { /* If this call fails - conn->cli can now be NULL ! */ DEBUG(10, ("cm_connect_lsa: Could not get schannel auth info " "for domain %s, trying anon\n", domain->name)); @@ -2226,7 +2227,7 @@ NTSTATUS cm_connect_lsa(struct winbindd_domain *domain, TALLOC_CTX *mem_ctx, result = cli_rpc_pipe_open_schannel_with_key (conn->cli, &ndr_table_lsarpc.syntax_id, PIPE_AUTH_LEVEL_PRIVACY, - domain->name, p_dcinfo, &conn->lsa_pipe); + domain->name, p_creds, &conn->lsa_pipe); if (!NT_STATUS_IS_OK(result)) { DEBUG(10,("cm_connect_lsa: failed to connect to LSA pipe for " diff --git a/source3/winbindd/winbindd_cred_cache.c b/source3/winbindd/winbindd_cred_cache.c index ff6d0f3df7..f11f75762d 100644 --- a/source3/winbindd/winbindd_cred_cache.c +++ b/source3/winbindd/winbindd_cred_cache.c @@ -23,6 +23,7 @@ #include "includes.h" #include "winbindd.h" +#include "../libcli/auth/libcli_auth.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_WINBIND diff --git a/source3/winbindd/winbindd_creds.c b/source3/winbindd/winbindd_creds.c index 9c7acd64e6..2f64f8b689 100644 --- a/source3/winbindd/winbindd_creds.c +++ b/source3/winbindd/winbindd_creds.c @@ -21,6 +21,7 @@ #include "includes.h" #include "winbindd.h" +#include "../libcli/auth/libcli_auth.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_WINBIND diff --git a/source3/winbindd/winbindd_pam.c b/source3/winbindd/winbindd_pam.c index 54bcac2b04..23de20f0d3 100644 --- a/source3/winbindd/winbindd_pam.c +++ b/source3/winbindd/winbindd_pam.c @@ -24,6 +24,7 @@ #include "includes.h" #include "winbindd.h" +#include "../libcli/auth/libcli_auth.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_WINBIND @@ -1238,13 +1239,13 @@ NTSTATUS winbindd_dual_pam_auth_samlogon(struct winbindd_domain *domain, the server's domain at this point. The 'server name' is also dodgy... */ - names_blob = NTLMv2_generate_names_blob(global_myname(), lp_workgroup()); + names_blob = NTLMv2_generate_names_blob(state->mem_ctx, global_myname(), lp_workgroup()); - if (!SMBNTLMv2encrypt(name_user, name_domain, + if (!SMBNTLMv2encrypt(NULL, name_user, name_domain, state->request.data.auth.pass, &server_chal, &names_blob, - &lm_response, &nt_response, NULL)) { + &lm_response, &nt_response, NULL, NULL)) { data_blob_free(&names_blob); data_blob_free(&server_chal); DEBUG(0, ("winbindd_pam_auth: SMBNTLMv2encrypt() failed!\n")); |