diff options
author | Andrew Bartlett <abartlet@samba.org> | 2011-12-27 10:25:55 +1100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2012-01-06 08:12:49 +0100 |
commit | a00032a92d9c0fcd4fa3f551abb901e5240f780f (patch) | |
tree | a946857f13846f35f39895a5024468e24af0576d /source3/rpc_client | |
parent | 21415568fe335d513545ef5788462551e2f1f1ae (diff) | |
download | samba-a00032a92d9c0fcd4fa3f551abb901e5240f780f.tar.gz samba-a00032a92d9c0fcd4fa3f551abb901e5240f780f.tar.bz2 samba-a00032a92d9c0fcd4fa3f551abb901e5240f780f.zip |
s3-libsmb Make auth_ntlmssp client more generic
As well as renaming, this allows us to start the mech by DCE/RPC auth
type or OID.
Andrew Bartlett
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source3/rpc_client')
-rw-r--r-- | source3/rpc_client/cli_pipe.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c index 8ea500db70..93e1357733 100644 --- a/source3/rpc_client/cli_pipe.c +++ b/source3/rpc_client/cli_pipe.c @@ -3,6 +3,7 @@ * RPC Pipe client routines * Largely rewritten by Jeremy Allison 2005. * Heavily modified by Simo Sorce 2010. + * Copyright Andrew Bartlett 2011. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -26,7 +27,7 @@ #include "../libcli/auth/schannel.h" #include "../libcli/auth/spnego.h" #include "../auth/ntlmssp/ntlmssp.h" -#include "ntlmssp_wrap.h" +#include "auth_generic.h" #include "librpc/gen_ndr/ndr_dcerpc.h" #include "librpc/rpc/dcerpc.h" #include "librpc/crypto/gse.h" @@ -2284,34 +2285,28 @@ static NTSTATUS rpccli_ntlmssp_bind_data(TALLOC_CTX *mem_ctx, goto fail; } - status = auth_ntlmssp_client_prepare(result, + status = auth_generic_client_prepare(result, &ntlmssp_ctx); if (!NT_STATUS_IS_OK(status)) { goto fail; } - status = auth_ntlmssp_set_username(ntlmssp_ctx, username); + status = auth_generic_set_username(ntlmssp_ctx, username); if (!NT_STATUS_IS_OK(status)) { goto fail; } - status = auth_ntlmssp_set_domain(ntlmssp_ctx, domain); + status = auth_generic_set_domain(ntlmssp_ctx, domain); if (!NT_STATUS_IS_OK(status)) { goto fail; } - status = auth_ntlmssp_set_password(ntlmssp_ctx, password); + status = auth_generic_set_password(ntlmssp_ctx, password); if (!NT_STATUS_IS_OK(status)) { goto fail; } - if (auth_level == DCERPC_AUTH_LEVEL_INTEGRITY) { - gensec_want_feature(ntlmssp_ctx->gensec_security, GENSEC_FEATURE_SIGN); - } else if (auth_level == DCERPC_AUTH_LEVEL_PRIVACY) { - gensec_want_feature(ntlmssp_ctx->gensec_security, GENSEC_FEATURE_SEAL); - } - - status = auth_ntlmssp_client_start(ntlmssp_ctx); + status = auth_generic_client_start_by_authtype(ntlmssp_ctx, auth_type, auth_level); if (!NT_STATUS_IS_OK(status)) { goto fail; } |