summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2013-09-18 17:44:10 +0200
committerGünther Deschner <gd@samba.org>2013-09-19 11:09:27 +0200
commit7b570b4128f9af212048ce56abd841a1f6fdc259 (patch)
treeff81f1d79a84d09c74d23736306fa6bfe0d3007b
parent8fce75aa58ec70547ad218bde154e141f2d17303 (diff)
downloadsamba-7b570b4128f9af212048ce56abd841a1f6fdc259.tar.gz
samba-7b570b4128f9af212048ce56abd841a1f6fdc259.tar.bz2
samba-7b570b4128f9af212048ce56abd841a1f6fdc259.zip
s3-rpc_cli: allow to pass down a netlogon CredentialState struct to gensec.
Guenther Signed-off-by: Günther Deschner <gd@samba.org> Pair-Programmed-With: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
-rw-r--r--source3/rpc_client/cli_pipe.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c
index ca0473ce47..fa0509b419 100644
--- a/source3/rpc_client/cli_pipe.c
+++ b/source3/rpc_client/cli_pipe.c
@@ -2150,6 +2150,7 @@ static NTSTATUS rpccli_generic_bind_data(TALLOC_CTX *mem_ctx,
const char *username,
const char *password,
enum credentials_use_kerberos use_kerberos,
+ struct netlogon_creds_CredentialState *creds,
struct pipe_auth_data **presult)
{
struct auth_generic_state *auth_generic_ctx;
@@ -2203,6 +2204,7 @@ static NTSTATUS rpccli_generic_bind_data(TALLOC_CTX *mem_ctx,
}
cli_credentials_set_kerberos_state(auth_generic_ctx->credentials, use_kerberos);
+ cli_credentials_set_netlogon_creds(auth_generic_ctx->credentials, creds);
status = auth_generic_client_start_by_authtype(auth_generic_ctx, auth_type, auth_level);
if (!NT_STATUS_IS_OK(status)) {
@@ -2802,6 +2804,7 @@ NTSTATUS cli_rpc_pipe_open_generic_auth(struct cli_state *cli,
server, target_service,
domain, username, password,
CRED_AUTO_USE_KERBEROS,
+ NULL,
&auth);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0, ("rpccli_generic_bind_data returned %s\n",
@@ -3029,7 +3032,7 @@ NTSTATUS cli_rpc_pipe_open_spnego(struct cli_state *cli,
DCERPC_AUTH_TYPE_SPNEGO, auth_level,
server, target_service,
domain, username, password,
- use_kerberos,
+ use_kerberos, NULL,
&auth);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0, ("rpccli_generic_bind_data returned %s\n",