summaryrefslogtreecommitdiff
path: root/source3/librpc/crypto
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-01-02 15:21:05 +1100
committerStefan Metzmacher <metze@samba.org>2012-01-11 09:09:43 +0100
commit49bafcfa48f2d440101c0634d934528cbee69bf1 (patch)
tree275af36879d8b53a07bd832abcc664343187dcfe /source3/librpc/crypto
parent50a939ad8580c24fc42be50cda531874bfd66efd (diff)
downloadsamba-49bafcfa48f2d440101c0634d934528cbee69bf1.tar.gz
samba-49bafcfa48f2d440101c0634d934528cbee69bf1.tar.bz2
samba-49bafcfa48f2d440101c0634d934528cbee69bf1.zip
s3-librpc Supply target service and server to spnego_generic_init_client()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source3/librpc/crypto')
-rw-r--r--source3/librpc/crypto/cli_spnego.c14
-rw-r--r--source3/librpc/crypto/spnego.h2
2 files changed, 16 insertions, 0 deletions
diff --git a/source3/librpc/crypto/cli_spnego.c b/source3/librpc/crypto/cli_spnego.c
index f64a537e20..98251c776e 100644
--- a/source3/librpc/crypto/cli_spnego.c
+++ b/source3/librpc/crypto/cli_spnego.c
@@ -88,6 +88,8 @@ NTSTATUS spnego_generic_init_client(TALLOC_CTX *mem_ctx,
const char *oid,
bool do_sign, bool do_seal,
bool is_dcerpc,
+ const char *server,
+ const char *target_service,
const char *domain,
const char *username,
const char *password,
@@ -148,6 +150,18 @@ NTSTATUS spnego_generic_init_client(TALLOC_CTX *mem_ctx,
GENSEC_FEATURE_DCE_STYLE);
}
+ status = gensec_set_target_service(auth_generic_state->gensec_security, target_service);
+ if (!NT_STATUS_IS_OK(status)) {
+ TALLOC_FREE(sp_ctx);
+ return status;
+ }
+
+ status = gensec_set_target_hostname(auth_generic_state->gensec_security, server);
+ if (!NT_STATUS_IS_OK(status)) {
+ TALLOC_FREE(sp_ctx);
+ return status;
+ }
+
status = auth_generic_client_start(auth_generic_state, oid);
if (!NT_STATUS_IS_OK(status)) {
TALLOC_FREE(sp_ctx);
diff --git a/source3/librpc/crypto/spnego.h b/source3/librpc/crypto/spnego.h
index 7e0f1590ab..a31f997ab6 100644
--- a/source3/librpc/crypto/spnego.h
+++ b/source3/librpc/crypto/spnego.h
@@ -65,6 +65,8 @@ NTSTATUS spnego_generic_init_client(TALLOC_CTX *mem_ctx,
const char *oid,
bool do_sign, bool do_seal,
bool is_dcerpc,
+ const char *server,
+ const char *target_service,
const char *domain,
const char *username,
const char *password,