summaryrefslogtreecommitdiff
path: root/source3/rpc_client
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2010-09-02 17:43:21 -0400
committerGünther Deschner <gd@samba.org>2010-09-23 10:54:22 -0700
commit59722ef2fb6973ac06de5c17c3f84995bac20816 (patch)
treecb19de1fd7dfa9a432059610dc83c938b48b63fe /source3/rpc_client
parent62d7226b7898ade0dc19a5b13a9632fd096c5771 (diff)
downloadsamba-59722ef2fb6973ac06de5c17c3f84995bac20816.tar.gz
samba-59722ef2fb6973ac06de5c17c3f84995bac20816.tar.bz2
samba-59722ef2fb6973ac06de5c17c3f84995bac20816.zip
spnego: avoid explicit dependency on dcerpc specific structures
Signed-off-by: Günther Deschner <gd@samba.org>
Diffstat (limited to 'source3/rpc_client')
-rw-r--r--source3/rpc_client/cli_pipe.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c
index 077a08a770..cca4f38a8c 100644
--- a/source3/rpc_client/cli_pipe.c
+++ b/source3/rpc_client/cli_pipe.c
@@ -2193,7 +2193,7 @@ bool rpccli_get_pwd_hash(struct rpc_pipe_client *rpc_cli, uint8_t nt_hash[16])
if (rpc_cli->auth->auth_type == DCERPC_AUTH_TYPE_NTLMSSP) {
a = rpc_cli->auth->a_u.auth_ntlmssp_state;
} else if (rpc_cli->auth->auth_type == DCERPC_AUTH_TYPE_SPNEGO) {
- enum dcerpc_AuthType auth_type;
+ enum spnego_mech auth_type;
void *auth_ctx;
NTSTATUS status;
@@ -2204,7 +2204,7 @@ bool rpccli_get_pwd_hash(struct rpc_pipe_client *rpc_cli, uint8_t nt_hash[16])
return false;
}
- if (auth_type == DCERPC_AUTH_TYPE_NTLMSSP) {
+ if (auth_type == SPNEGO_NTLMSSP) {
a = talloc_get_type(auth_ctx,
struct auth_ntlmssp_state);
}
@@ -3083,10 +3083,14 @@ NTSTATUS cli_rpc_pipe_open_spnego_krb5(struct cli_state *cli,
goto err_out;
}
- status = spnego_gssapi_init_client(auth, auth->auth_level,
+ status = spnego_gssapi_init_client(auth,
+ (auth->auth_level ==
+ DCERPC_AUTH_LEVEL_INTEGRITY),
+ (auth->auth_level ==
+ DCERPC_AUTH_LEVEL_PRIVACY),
+ true,
NULL, server, "cifs",
username, password,
- GSS_C_DCE_STYLE,
&auth->a_u.spnego_state);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0, ("spnego_init_client returned %s\n",
@@ -3153,7 +3157,12 @@ NTSTATUS cli_rpc_pipe_open_spnego_ntlmssp(struct cli_state *cli,
goto err_out;
}
- status = spnego_ntlmssp_init_client(auth, auth->auth_level,
+ status = spnego_ntlmssp_init_client(auth,
+ (auth->auth_level ==
+ DCERPC_AUTH_LEVEL_INTEGRITY),
+ (auth->auth_level ==
+ DCERPC_AUTH_LEVEL_PRIVACY),
+ true,
domain, username, password,
&auth->a_u.spnego_state);
if (!NT_STATUS_IS_OK(status)) {