mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
s3-rpc_client: add dcerpc_transport_t to cli_rpc_pipe_open_spnego_ntlmssp and cli_rpc_pipe_open_ntlmssp.
Guenther
This commit is contained in:
parent
12acf6ca72
commit
032e01e7c1
@ -5317,6 +5317,7 @@ NTSTATUS cli_rpc_pipe_open_noauth_transport(struct cli_state *cli,
|
||||
struct rpc_pipe_client **presult);
|
||||
NTSTATUS cli_rpc_pipe_open_ntlmssp(struct cli_state *cli,
|
||||
const struct ndr_syntax_id *interface,
|
||||
enum dcerpc_transport_t transport,
|
||||
enum pipe_auth_level auth_level,
|
||||
const char *domain,
|
||||
const char *username,
|
||||
@ -5324,6 +5325,7 @@ NTSTATUS cli_rpc_pipe_open_ntlmssp(struct cli_state *cli,
|
||||
struct rpc_pipe_client **presult);
|
||||
NTSTATUS cli_rpc_pipe_open_spnego_ntlmssp(struct cli_state *cli,
|
||||
const struct ndr_syntax_id *interface,
|
||||
enum dcerpc_transport_t transport,
|
||||
enum pipe_auth_level auth_level,
|
||||
const char *domain,
|
||||
const char *username,
|
||||
|
@ -176,6 +176,7 @@ NTSTATUS remote_password_change(const char *remote_machine, const char *user_nam
|
||||
if (!pass_must_change) {
|
||||
result = cli_rpc_pipe_open_ntlmssp(cli,
|
||||
&ndr_table_samr.syntax_id,
|
||||
NCACN_NP,
|
||||
PIPE_AUTH_LEVEL_PRIVACY,
|
||||
domain, user,
|
||||
old_passwd,
|
||||
|
@ -3700,6 +3700,7 @@ NTSTATUS cli_rpc_pipe_open_noauth(struct cli_state *cli,
|
||||
|
||||
static NTSTATUS cli_rpc_pipe_open_ntlmssp_internal(struct cli_state *cli,
|
||||
const struct ndr_syntax_id *interface,
|
||||
enum dcerpc_transport_t transport,
|
||||
enum pipe_auth_type auth_type,
|
||||
enum pipe_auth_level auth_level,
|
||||
const char *domain,
|
||||
@ -3711,7 +3712,7 @@ static NTSTATUS cli_rpc_pipe_open_ntlmssp_internal(struct cli_state *cli,
|
||||
struct cli_pipe_auth_data *auth;
|
||||
NTSTATUS status;
|
||||
|
||||
status = cli_rpc_pipe_open(cli, NCACN_NP, interface, &result);
|
||||
status = cli_rpc_pipe_open(cli, transport, interface, &result);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
return status;
|
||||
}
|
||||
@ -3753,6 +3754,7 @@ static NTSTATUS cli_rpc_pipe_open_ntlmssp_internal(struct cli_state *cli,
|
||||
|
||||
NTSTATUS cli_rpc_pipe_open_ntlmssp(struct cli_state *cli,
|
||||
const struct ndr_syntax_id *interface,
|
||||
enum dcerpc_transport_t transport,
|
||||
enum pipe_auth_level auth_level,
|
||||
const char *domain,
|
||||
const char *username,
|
||||
@ -3761,6 +3763,7 @@ NTSTATUS cli_rpc_pipe_open_ntlmssp(struct cli_state *cli,
|
||||
{
|
||||
return cli_rpc_pipe_open_ntlmssp_internal(cli,
|
||||
interface,
|
||||
transport,
|
||||
PIPE_AUTH_TYPE_NTLMSSP,
|
||||
auth_level,
|
||||
domain,
|
||||
@ -3776,6 +3779,7 @@ NTSTATUS cli_rpc_pipe_open_ntlmssp(struct cli_state *cli,
|
||||
|
||||
NTSTATUS cli_rpc_pipe_open_spnego_ntlmssp(struct cli_state *cli,
|
||||
const struct ndr_syntax_id *interface,
|
||||
enum dcerpc_transport_t transport,
|
||||
enum pipe_auth_level auth_level,
|
||||
const char *domain,
|
||||
const char *username,
|
||||
@ -3784,6 +3788,7 @@ NTSTATUS cli_rpc_pipe_open_spnego_ntlmssp(struct cli_state *cli,
|
||||
{
|
||||
return cli_rpc_pipe_open_ntlmssp_internal(cli,
|
||||
interface,
|
||||
transport,
|
||||
PIPE_AUTH_TYPE_SPNEGO_NTLMSSP,
|
||||
auth_level,
|
||||
domain,
|
||||
@ -3952,7 +3957,8 @@ static NTSTATUS get_schannel_session_key_auth_ntlmssp(struct cli_state *cli,
|
||||
NTSTATUS status;
|
||||
|
||||
status = cli_rpc_pipe_open_spnego_ntlmssp(
|
||||
cli, &ndr_table_netlogon.syntax_id, PIPE_AUTH_LEVEL_PRIVACY,
|
||||
cli, &ndr_table_netlogon.syntax_id, NCACN_NP,
|
||||
PIPE_AUTH_LEVEL_PRIVACY,
|
||||
domain, username, password, &netlogon_pipe);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
return status;
|
||||
|
@ -650,6 +650,7 @@ static NTSTATUS do_cmd(struct cli_state *cli,
|
||||
case PIPE_AUTH_TYPE_SPNEGO_NTLMSSP:
|
||||
ntresult = cli_rpc_pipe_open_spnego_ntlmssp(
|
||||
cli, cmd_entry->interface,
|
||||
default_transport,
|
||||
pipe_default_auth_level,
|
||||
lp_workgroup(),
|
||||
get_cmdline_auth_info_username(auth_info),
|
||||
@ -659,6 +660,7 @@ static NTSTATUS do_cmd(struct cli_state *cli,
|
||||
case PIPE_AUTH_TYPE_NTLMSSP:
|
||||
ntresult = cli_rpc_pipe_open_ntlmssp(
|
||||
cli, cmd_entry->interface,
|
||||
default_transport,
|
||||
pipe_default_auth_level,
|
||||
lp_workgroup(),
|
||||
get_cmdline_auth_info_username(auth_info),
|
||||
|
@ -170,6 +170,7 @@ enum netdom_domain_t { ND_TYPE_NT4, ND_TYPE_AD };
|
||||
#define NET_FLAGS_NO_PIPE 0x00000020 /* don't open an RPC pipe */
|
||||
#define NET_FLAGS_SIGN 0x00000040 /* sign RPC connection */
|
||||
#define NET_FLAGS_SEAL 0x00000080 /* seal RPC connection */
|
||||
#define NET_FLAGS_TCP 0x00000100 /* use ncacn_ip_tcp */
|
||||
|
||||
/* net share operation modes */
|
||||
#define NET_MODE_SHARE_MIGRATE 1
|
||||
|
@ -170,6 +170,8 @@ int run_rpc_command(struct net_context *c,
|
||||
if (conn_flags & NET_FLAGS_SEAL) {
|
||||
nt_status = cli_rpc_pipe_open_ntlmssp(
|
||||
cli, interface,
|
||||
(conn_flags & NET_FLAGS_TCP) ?
|
||||
NCACN_IP_TCP : NCACN_NP,
|
||||
PIPE_AUTH_LEVEL_PRIVACY,
|
||||
lp_workgroup(), c->opt_user_name,
|
||||
c->opt_password, &pipe_hnd);
|
||||
|
@ -502,7 +502,7 @@ int rpc_vampire_keytab(struct net_context *c, int argc, const char **argv)
|
||||
return -1;
|
||||
} else {
|
||||
ret = run_rpc_command(c, cli, &ndr_table_drsuapi.syntax_id,
|
||||
NET_FLAGS_SEAL,
|
||||
NET_FLAGS_SEAL | NET_FLAGS_TCP,
|
||||
rpc_vampire_keytab_ds_internals, argc, argv);
|
||||
if (ret != 0 && dc_info.is_mixed_mode) {
|
||||
printf(_("Fallback to NT4 vampire on Mixed-Mode AD "
|
||||
|
@ -2055,6 +2055,7 @@ NTSTATUS cm_connect_sam(struct winbindd_domain *domain, TALLOC_CTX *mem_ctx,
|
||||
authenticated SAMR pipe with sign & seal. */
|
||||
result = cli_rpc_pipe_open_spnego_ntlmssp(conn->cli,
|
||||
&ndr_table_samr.syntax_id,
|
||||
NCACN_NP,
|
||||
PIPE_AUTH_LEVEL_PRIVACY,
|
||||
domain_name,
|
||||
machine_account,
|
||||
@ -2193,7 +2194,7 @@ 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
|
||||
(conn->cli, &ndr_table_lsarpc.syntax_id,
|
||||
(conn->cli, &ndr_table_lsarpc.syntax_id, NCACN_NP,
|
||||
PIPE_AUTH_LEVEL_PRIVACY,
|
||||
conn->cli->domain, conn->cli->user_name, conn->cli->password,
|
||||
&conn->lsa_pipe);
|
||||
|
Loading…
Reference in New Issue
Block a user