if (!pass_must_change) {
result = cli_rpc_pipe_open_generic_auth(cli,
- &ndr_table_samr.syntax_id,
+ &ndr_table_samr,
NCACN_NP,
DCERPC_AUTH_TYPE_NTLMSSP,
DCERPC_AUTH_LEVEL_PRIVACY,
****************************************************************************/
NTSTATUS cli_rpc_pipe_open_generic_auth(struct cli_state *cli,
- const struct ndr_syntax_id *interface,
+ const struct ndr_interface_table *table,
enum dcerpc_transport_t transport,
enum dcerpc_AuthType auth_type,
enum dcerpc_AuthLevel auth_level,
{
struct rpc_pipe_client *result;
struct pipe_auth_data *auth = NULL;
- const char *target_service = "cifs"; /* TODO: Determine target service from the bindings or interface table */
+ const char *target_service = table->authservices->names[0];
NTSTATUS status;
- status = cli_rpc_pipe_open(cli, transport, interface, &result);
+ status = cli_rpc_pipe_open(cli, transport, &table->syntax_id, &result);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
}
DEBUG(10,("cli_rpc_pipe_open_generic_auth: opened pipe %s to "
- "machine %s and bound as user %s\\%s.\n",
- get_pipe_name_from_syntax(talloc_tos(), interface),
+ "machine %s and bound as user %s\\%s.\n", table->name,
result->desthost, domain, username));
*presult = result;
}
NTSTATUS cli_rpc_pipe_open_spnego(struct cli_state *cli,
- const struct ndr_syntax_id *interface,
+ const struct ndr_interface_table *table,
enum dcerpc_transport_t transport,
const char *oid,
enum dcerpc_AuthLevel auth_level,
struct pipe_auth_data *auth;
struct spnego_context *spnego_ctx;
NTSTATUS status;
- const char *target_service = "cifs"; /* TODO: Determine target service from the bindings or interface table */
+ const char *target_service = table->authservices->names[0];
- status = cli_rpc_pipe_open(cli, transport, interface, &result);
+ status = cli_rpc_pipe_open(cli, transport, &table->syntax_id, &result);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
struct rpc_pipe_client **presult);
NTSTATUS cli_rpc_pipe_open_generic_auth(struct cli_state *cli,
- const struct ndr_syntax_id *interface,
+ const struct ndr_interface_table *table,
enum dcerpc_transport_t transport,
enum dcerpc_AuthType auth_type,
enum dcerpc_AuthLevel auth_level,
struct rpc_pipe_client **presult);
NTSTATUS cli_rpc_pipe_open_spnego(struct cli_state *cli,
- const struct ndr_syntax_id *interface,
+ const struct ndr_interface_table *table,
enum dcerpc_transport_t transport,
const char *oid,
enum dcerpc_AuthLevel auth_level,
NTSTATUS status;
status = cli_rpc_pipe_open_spnego(
- cli, &ndr_table_netlogon.syntax_id, NCACN_NP,
+ cli, &ndr_table_netlogon, NCACN_NP,
GENSEC_OID_NTLMSSP,
DCERPC_AUTH_LEVEL_PRIVACY,
cli_state_remote_name(cli),
break;
}
ntresult = cli_rpc_pipe_open_spnego(
- cli, &cmd_entry->table->syntax_id,
+ cli, cmd_entry->table,
default_transport,
oid,
pipe_default_auth_level,
case DCERPC_AUTH_TYPE_NTLMSSP:
case DCERPC_AUTH_TYPE_KRB5:
ntresult = cli_rpc_pipe_open_generic_auth(
- cli, &cmd_entry->table->syntax_id,
+ cli, cmd_entry->table,
default_transport,
pipe_default_auth_type,
pipe_default_auth_level,
} else {
if (conn_flags & NET_FLAGS_SEAL) {
nt_status = cli_rpc_pipe_open_generic_auth(
- cli, &table->syntax_id,
+ cli, table,
(conn_flags & NET_FLAGS_TCP) ?
NCACN_IP_TCP : NCACN_NP,
DCERPC_AUTH_TYPE_NTLMSSP,
/* We have an authenticated connection. Use a NTLMSSP SPNEGO
authenticated SAMR pipe with sign & seal. */
status = cli_rpc_pipe_open_spnego(conn->cli,
- &ndr_table_samr.syntax_id,
+ &ndr_table_samr,
NCACN_NP,
GENSEC_OID_NTLMSSP,
DCERPC_AUTH_LEVEL_PRIVACY,
/* We have an authenticated connection. Use a NTLMSSP SPNEGO
* authenticated LSA pipe with sign & seal. */
result = cli_rpc_pipe_open_spnego
- (conn->cli, &ndr_table_lsarpc.syntax_id, NCACN_NP,
+ (conn->cli, &ndr_table_lsarpc, NCACN_NP,
GENSEC_OID_NTLMSSP,
DCERPC_AUTH_LEVEL_PRIVACY,
cli_state_remote_name(conn->cli),