diff options
author | Andrew Bartlett <abartlet@samba.org> | 2012-01-10 21:03:02 +1100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2012-01-18 16:23:23 +0100 |
commit | c62af4f6526d5b4a47b70ecfc4c1c03b1b64cf18 (patch) | |
tree | d3253d05829569948981434cba9a93a213360e6f /source3/winbindd | |
parent | f14bcdf8ec894d77f80e532859c2c7170406eaad (diff) | |
download | samba-c62af4f6526d5b4a47b70ecfc4c1c03b1b64cf18.tar.gz samba-c62af4f6526d5b4a47b70ecfc4c1c03b1b64cf18.tar.bz2 samba-c62af4f6526d5b4a47b70ecfc4c1c03b1b64cf18.zip |
s3-librpc Make cli_rpc_pipe_open_spnego_ntlmssp() generic
This also avoids passing NULL as the server to
gensec_set_target_hostname() in spnego_generic_init_client().
Andrew Bartlett
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source3/winbindd')
-rw-r--r-- | source3/winbindd/winbindd_cm.c | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c index 8563050273..5d8826127b 100644 --- a/source3/winbindd/winbindd_cm.c +++ b/source3/winbindd/winbindd_cm.c @@ -76,6 +76,7 @@ #include "../libcli/security/security.h" #include "passdb.h" #include "messages.h" +#include "auth/gensec/gensec.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_WINBIND @@ -2189,14 +2190,16 @@ NTSTATUS cm_connect_sam(struct winbindd_domain *domain, TALLOC_CTX *mem_ctx, /* We have an authenticated connection. Use a NTLMSSP SPNEGO authenticated SAMR pipe with sign & seal. */ - status = cli_rpc_pipe_open_spnego_ntlmssp(conn->cli, - &ndr_table_samr.syntax_id, - NCACN_NP, - DCERPC_AUTH_LEVEL_PRIVACY, - domain_name, - machine_account, - machine_password, - &conn->samr_pipe); + status = cli_rpc_pipe_open_spnego(conn->cli, + &ndr_table_samr.syntax_id, + NCACN_NP, + GENSEC_OID_NTLMSSP, + DCERPC_AUTH_LEVEL_PRIVACY, + cli_state_remote_name(conn->cli), + domain_name, + machine_account, + machine_password, + &conn->samr_pipe); if (!NT_STATUS_IS_OK(status)) { DEBUG(10,("cm_connect_sam: failed to connect to SAMR " @@ -2427,9 +2430,11 @@ NTSTATUS cm_connect_lsa(struct winbindd_domain *domain, TALLOC_CTX *mem_ctx, /* We have an authenticated connection. Use a NTLMSSP SPNEGO * authenticated LSA pipe with sign & seal. */ - result = cli_rpc_pipe_open_spnego_ntlmssp + result = cli_rpc_pipe_open_spnego (conn->cli, &ndr_table_lsarpc.syntax_id, NCACN_NP, + GENSEC_OID_NTLMSSP, DCERPC_AUTH_LEVEL_PRIVACY, + cli_state_remote_name(conn->cli), conn->cli->domain, conn->cli->user_name, conn->cli->password, &conn->lsa_pipe); |