summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/include/proto.h2
-rw-r--r--source3/libsmb/passchange.c1
-rw-r--r--source3/rpc_client/cli_pipe.c10
-rw-r--r--source3/rpcclient/rpcclient.c2
-rw-r--r--source3/utils/net.h1
-rw-r--r--source3/utils/net_rpc.c2
-rw-r--r--source3/utils/net_rpc_samsync.c2
-rw-r--r--source3/winbindd/winbindd_cm.c3
8 files changed, 19 insertions, 4 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index ddb8dddbed..297d3fb05d 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -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,
diff --git a/source3/libsmb/passchange.c b/source3/libsmb/passchange.c
index c83247a3c5..ab951618fe 100644
--- a/source3/libsmb/passchange.c
+++ b/source3/libsmb/passchange.c
@@ -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,
diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c
index 7aaee413f9..fbf5c9a781 100644
--- a/source3/rpc_client/cli_pipe.c
+++ b/source3/rpc_client/cli_pipe.c
@@ -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;
diff --git a/source3/rpcclient/rpcclient.c b/source3/rpcclient/rpcclient.c
index 3489652992..60fda23a19 100644
--- a/source3/rpcclient/rpcclient.c
+++ b/source3/rpcclient/rpcclient.c
@@ -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),
diff --git a/source3/utils/net.h b/source3/utils/net.h
index c12c45e10f..765b61bd56 100644
--- a/source3/utils/net.h
+++ b/source3/utils/net.h
@@ -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
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c
index 73f8b0b979..1513cf561f 100644
--- a/source3/utils/net_rpc.c
+++ b/source3/utils/net_rpc.c
@@ -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);
diff --git a/source3/utils/net_rpc_samsync.c b/source3/utils/net_rpc_samsync.c
index d7a5bc15c3..89568eef94 100644
--- a/source3/utils/net_rpc_samsync.c
+++ b/source3/utils/net_rpc_samsync.c
@@ -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 "
diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c
index 50742c1715..fd35e20b65 100644
--- a/source3/winbindd/winbindd_cm.c
+++ b/source3/winbindd/winbindd_cm.c
@@ -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);