mirror of
https://github.com/samba-team/samba.git
synced 2025-11-09 20:23:51 +03:00
r24551: rename dcerpc_interface_table -> ndr_interface_table
rename dcerpc_interface_list -> ndr_interface_list and move them to libndr.h metze
This commit is contained in:
committed by
Gerald (Jerry) Carter
parent
473bca74dc
commit
4adbebef5d
@@ -62,7 +62,7 @@ typedef NTSTATUS (*irpc_function_t)(struct irpc_message *, void *r);
|
|||||||
*/
|
*/
|
||||||
struct irpc_request {
|
struct irpc_request {
|
||||||
struct messaging_context *msg_ctx;
|
struct messaging_context *msg_ctx;
|
||||||
const struct dcerpc_interface_table *table;
|
const struct ndr_interface_table *table;
|
||||||
int callnum;
|
int callnum;
|
||||||
int callid;
|
int callid;
|
||||||
void *r;
|
void *r;
|
||||||
@@ -103,16 +103,16 @@ void messaging_deregister(struct messaging_context *msg, uint32_t msg_type, void
|
|||||||
|
|
||||||
|
|
||||||
NTSTATUS irpc_register(struct messaging_context *msg_ctx,
|
NTSTATUS irpc_register(struct messaging_context *msg_ctx,
|
||||||
const struct dcerpc_interface_table *table,
|
const struct ndr_interface_table *table,
|
||||||
int call, irpc_function_t fn, void *private);
|
int call, irpc_function_t fn, void *private);
|
||||||
struct irpc_request *irpc_call_send(struct messaging_context *msg_ctx,
|
struct irpc_request *irpc_call_send(struct messaging_context *msg_ctx,
|
||||||
struct server_id server_id,
|
struct server_id server_id,
|
||||||
const struct dcerpc_interface_table *table,
|
const struct ndr_interface_table *table,
|
||||||
int callnum, void *r, TALLOC_CTX *ctx);
|
int callnum, void *r, TALLOC_CTX *ctx);
|
||||||
NTSTATUS irpc_call_recv(struct irpc_request *irpc);
|
NTSTATUS irpc_call_recv(struct irpc_request *irpc);
|
||||||
NTSTATUS irpc_call(struct messaging_context *msg_ctx,
|
NTSTATUS irpc_call(struct messaging_context *msg_ctx,
|
||||||
struct server_id server_id,
|
struct server_id server_id,
|
||||||
const struct dcerpc_interface_table *table,
|
const struct ndr_interface_table *table,
|
||||||
int callnum, void *r, TALLOC_CTX *ctx);
|
int callnum, void *r, TALLOC_CTX *ctx);
|
||||||
|
|
||||||
NTSTATUS irpc_add_name(struct messaging_context *msg_ctx, const char *name);
|
NTSTATUS irpc_add_name(struct messaging_context *msg_ctx, const char *name);
|
||||||
|
|||||||
@@ -620,7 +620,7 @@ struct messaging_context *messaging_client_init(TALLOC_CTX *mem_ctx,
|
|||||||
struct irpc_list {
|
struct irpc_list {
|
||||||
struct irpc_list *next, *prev;
|
struct irpc_list *next, *prev;
|
||||||
struct GUID uuid;
|
struct GUID uuid;
|
||||||
const struct dcerpc_interface_table *table;
|
const struct ndr_interface_table *table;
|
||||||
int callnum;
|
int callnum;
|
||||||
irpc_function_t fn;
|
irpc_function_t fn;
|
||||||
void *private;
|
void *private;
|
||||||
@@ -631,7 +631,7 @@ struct irpc_list {
|
|||||||
register a irpc server function
|
register a irpc server function
|
||||||
*/
|
*/
|
||||||
NTSTATUS irpc_register(struct messaging_context *msg_ctx,
|
NTSTATUS irpc_register(struct messaging_context *msg_ctx,
|
||||||
const struct dcerpc_interface_table *table,
|
const struct ndr_interface_table *table,
|
||||||
int callnum, irpc_function_t fn, void *private)
|
int callnum, irpc_function_t fn, void *private)
|
||||||
{
|
{
|
||||||
struct irpc_list *irpc;
|
struct irpc_list *irpc;
|
||||||
@@ -843,7 +843,7 @@ static void irpc_timeout(struct event_context *ev, struct timed_event *te,
|
|||||||
*/
|
*/
|
||||||
struct irpc_request *irpc_call_send(struct messaging_context *msg_ctx,
|
struct irpc_request *irpc_call_send(struct messaging_context *msg_ctx,
|
||||||
struct server_id server_id,
|
struct server_id server_id,
|
||||||
const struct dcerpc_interface_table *table,
|
const struct ndr_interface_table *table,
|
||||||
int callnum, void *r, TALLOC_CTX *ctx)
|
int callnum, void *r, TALLOC_CTX *ctx)
|
||||||
{
|
{
|
||||||
struct irpc_header header;
|
struct irpc_header header;
|
||||||
@@ -933,7 +933,7 @@ NTSTATUS irpc_call_recv(struct irpc_request *irpc)
|
|||||||
*/
|
*/
|
||||||
NTSTATUS irpc_call(struct messaging_context *msg_ctx,
|
NTSTATUS irpc_call(struct messaging_context *msg_ctx,
|
||||||
struct server_id server_id,
|
struct server_id server_id,
|
||||||
const struct dcerpc_interface_table *table,
|
const struct ndr_interface_table *table,
|
||||||
int callnum, void *r,
|
int callnum, void *r,
|
||||||
TALLOC_CTX *mem_ctx)
|
TALLOC_CTX *mem_ctx)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ struct libnet_RpcConnect {
|
|||||||
const char *name;
|
const char *name;
|
||||||
const char *address;
|
const char *address;
|
||||||
const char *binding;
|
const char *binding;
|
||||||
const struct dcerpc_interface_table *dcerpc_iface;
|
const struct ndr_interface_table *dcerpc_iface;
|
||||||
} in;
|
} in;
|
||||||
struct {
|
struct {
|
||||||
struct dcerpc_pipe *dcerpc_pipe;
|
struct dcerpc_pipe *dcerpc_pipe;
|
||||||
|
|||||||
@@ -304,6 +304,21 @@ struct ndr_interface_string_array {
|
|||||||
const char * const *names;
|
const char * const *names;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct ndr_interface_table {
|
||||||
|
const char *name;
|
||||||
|
struct ndr_syntax_id syntax_id;
|
||||||
|
const char *helpstring;
|
||||||
|
uint32_t num_calls;
|
||||||
|
const struct ndr_interface_call *calls;
|
||||||
|
const struct ndr_interface_string_array *endpoints;
|
||||||
|
const struct ndr_interface_string_array *authservices;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct ndr_interface_list {
|
||||||
|
struct ndr_interface_list *prev, *next;
|
||||||
|
const struct ndr_interface_table *table;
|
||||||
|
};
|
||||||
|
|
||||||
/* FIXME: Use represent_as instead */
|
/* FIXME: Use represent_as instead */
|
||||||
struct dom_sid;
|
struct dom_sid;
|
||||||
NTSTATUS ndr_push_dom_sid2(struct ndr_push *ndr, int ndr_flags, const struct dom_sid *sid);
|
NTSTATUS ndr_push_dom_sid2(struct ndr_push *ndr, int ndr_flags, const struct dom_sid *sid);
|
||||||
|
|||||||
@@ -1312,7 +1312,7 @@ static NTSTATUS dcerpc_ndr_validate_out(struct dcerpc_connection *c,
|
|||||||
*/
|
*/
|
||||||
struct rpc_request *dcerpc_ndr_request_send(struct dcerpc_pipe *p,
|
struct rpc_request *dcerpc_ndr_request_send(struct dcerpc_pipe *p,
|
||||||
const struct GUID *object,
|
const struct GUID *object,
|
||||||
const struct dcerpc_interface_table *table,
|
const struct ndr_interface_table *table,
|
||||||
uint32_t opnum,
|
uint32_t opnum,
|
||||||
TALLOC_CTX *mem_ctx,
|
TALLOC_CTX *mem_ctx,
|
||||||
void *r)
|
void *r)
|
||||||
@@ -1390,7 +1390,7 @@ _PUBLIC_ NTSTATUS dcerpc_ndr_request_recv(struct rpc_request *req)
|
|||||||
TALLOC_CTX *mem_ctx = req->ndr.mem_ctx;
|
TALLOC_CTX *mem_ctx = req->ndr.mem_ctx;
|
||||||
void *r = req->ndr.struct_ptr;
|
void *r = req->ndr.struct_ptr;
|
||||||
uint32_t opnum = req->ndr.opnum;
|
uint32_t opnum = req->ndr.opnum;
|
||||||
const struct dcerpc_interface_table *table = req->ndr.table;
|
const struct ndr_interface_table *table = req->ndr.table;
|
||||||
const struct ndr_interface_call *call = &table->calls[opnum];
|
const struct ndr_interface_call *call = &table->calls[opnum];
|
||||||
|
|
||||||
/* make sure the recv code doesn't free the request, as we
|
/* make sure the recv code doesn't free the request, as we
|
||||||
@@ -1469,7 +1469,7 @@ _PUBLIC_ NTSTATUS dcerpc_ndr_request_recv(struct rpc_request *req)
|
|||||||
*/
|
*/
|
||||||
NTSTATUS dcerpc_ndr_request(struct dcerpc_pipe *p,
|
NTSTATUS dcerpc_ndr_request(struct dcerpc_pipe *p,
|
||||||
const struct GUID *object,
|
const struct GUID *object,
|
||||||
const struct dcerpc_interface_table *table,
|
const struct ndr_interface_table *table,
|
||||||
uint32_t opnum,
|
uint32_t opnum,
|
||||||
TALLOC_CTX *mem_ctx,
|
TALLOC_CTX *mem_ctx,
|
||||||
void *r)
|
void *r)
|
||||||
|
|||||||
@@ -158,21 +158,6 @@ struct dcerpc_pipe {
|
|||||||
/* this triggers the DCERPC_PFC_FLAG_CONC_MPX flag in the bind request */
|
/* this triggers the DCERPC_PFC_FLAG_CONC_MPX flag in the bind request */
|
||||||
#define DCERPC_CONCURRENT_MULTIPLEX (1<<19)
|
#define DCERPC_CONCURRENT_MULTIPLEX (1<<19)
|
||||||
|
|
||||||
struct dcerpc_interface_table {
|
|
||||||
const char *name;
|
|
||||||
struct ndr_syntax_id syntax_id;
|
|
||||||
const char *helpstring;
|
|
||||||
uint32_t num_calls;
|
|
||||||
const struct ndr_interface_call *calls;
|
|
||||||
const struct ndr_interface_string_array *endpoints;
|
|
||||||
const struct ndr_interface_string_array *authservices;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct dcerpc_interface_list {
|
|
||||||
struct dcerpc_interface_list *prev, *next;
|
|
||||||
const struct dcerpc_interface_table *table;
|
|
||||||
};
|
|
||||||
|
|
||||||
/* this describes a binding to a particular transport/pipe */
|
/* this describes a binding to a particular transport/pipe */
|
||||||
struct dcerpc_binding {
|
struct dcerpc_binding {
|
||||||
enum dcerpc_transport_t transport;
|
enum dcerpc_transport_t transport;
|
||||||
@@ -190,7 +175,7 @@ struct dcerpc_pipe_connect {
|
|||||||
struct dcerpc_pipe *pipe;
|
struct dcerpc_pipe *pipe;
|
||||||
struct dcerpc_binding *binding;
|
struct dcerpc_binding *binding;
|
||||||
const char *pipe_name;
|
const char *pipe_name;
|
||||||
const struct dcerpc_interface_table *interface;
|
const struct ndr_interface_table *interface;
|
||||||
struct cli_credentials *creds;
|
struct cli_credentials *creds;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -227,7 +212,7 @@ struct rpc_request {
|
|||||||
|
|
||||||
/* use by the ndr level async recv call */
|
/* use by the ndr level async recv call */
|
||||||
struct {
|
struct {
|
||||||
const struct dcerpc_interface_table *table;
|
const struct ndr_interface_table *table;
|
||||||
uint32_t opnum;
|
uint32_t opnum;
|
||||||
void *struct_ptr;
|
void *struct_ptr;
|
||||||
TALLOC_CTX *mem_ctx;
|
TALLOC_CTX *mem_ctx;
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
/*
|
/*
|
||||||
return the rpc syntax and transfer syntax given the pipe uuid and version
|
return the rpc syntax and transfer syntax given the pipe uuid and version
|
||||||
*/
|
*/
|
||||||
static NTSTATUS dcerpc_init_syntaxes(const struct dcerpc_interface_table *table,
|
static NTSTATUS dcerpc_init_syntaxes(const struct ndr_interface_table *table,
|
||||||
struct ndr_syntax_id *syntax,
|
struct ndr_syntax_id *syntax,
|
||||||
struct ndr_syntax_id *transfer_syntax)
|
struct ndr_syntax_id *transfer_syntax)
|
||||||
{
|
{
|
||||||
@@ -47,7 +47,7 @@ static NTSTATUS dcerpc_init_syntaxes(const struct dcerpc_interface_table *table,
|
|||||||
*/
|
*/
|
||||||
struct composite_context *dcerpc_bind_auth_none_send(TALLOC_CTX *mem_ctx,
|
struct composite_context *dcerpc_bind_auth_none_send(TALLOC_CTX *mem_ctx,
|
||||||
struct dcerpc_pipe *p,
|
struct dcerpc_pipe *p,
|
||||||
const struct dcerpc_interface_table *table)
|
const struct ndr_interface_table *table)
|
||||||
{
|
{
|
||||||
struct ndr_syntax_id syntax;
|
struct ndr_syntax_id syntax;
|
||||||
struct ndr_syntax_id transfer_syntax;
|
struct ndr_syntax_id transfer_syntax;
|
||||||
@@ -86,7 +86,7 @@ NTSTATUS dcerpc_bind_auth_none_recv(struct composite_context *ctx)
|
|||||||
Perform sync non-authenticated dcerpc bind
|
Perform sync non-authenticated dcerpc bind
|
||||||
*/
|
*/
|
||||||
NTSTATUS dcerpc_bind_auth_none(struct dcerpc_pipe *p,
|
NTSTATUS dcerpc_bind_auth_none(struct dcerpc_pipe *p,
|
||||||
const struct dcerpc_interface_table *table)
|
const struct ndr_interface_table *table)
|
||||||
{
|
{
|
||||||
struct composite_context *ctx;
|
struct composite_context *ctx;
|
||||||
|
|
||||||
@@ -209,7 +209,7 @@ static void bind_auth_recv_bindreply(struct composite_context *creq)
|
|||||||
|
|
||||||
struct composite_context *dcerpc_bind_auth_send(TALLOC_CTX *mem_ctx,
|
struct composite_context *dcerpc_bind_auth_send(TALLOC_CTX *mem_ctx,
|
||||||
struct dcerpc_pipe *p,
|
struct dcerpc_pipe *p,
|
||||||
const struct dcerpc_interface_table *table,
|
const struct ndr_interface_table *table,
|
||||||
struct cli_credentials *credentials,
|
struct cli_credentials *credentials,
|
||||||
uint8_t auth_type, uint8_t auth_level,
|
uint8_t auth_type, uint8_t auth_level,
|
||||||
const char *service)
|
const char *service)
|
||||||
@@ -370,7 +370,7 @@ NTSTATUS dcerpc_bind_auth_recv(struct composite_context *creq)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
NTSTATUS dcerpc_bind_auth(struct dcerpc_pipe *p,
|
NTSTATUS dcerpc_bind_auth(struct dcerpc_pipe *p,
|
||||||
const struct dcerpc_interface_table *table,
|
const struct ndr_interface_table *table,
|
||||||
struct cli_credentials *credentials,
|
struct cli_credentials *credentials,
|
||||||
uint8_t auth_type, uint8_t auth_level,
|
uint8_t auth_type, uint8_t auth_level,
|
||||||
const char *service)
|
const char *service)
|
||||||
|
|||||||
@@ -459,7 +459,7 @@ static NTSTATUS dcerpc_pipe_connect_ncalrpc_recv(struct composite_context *c)
|
|||||||
struct pipe_connect_state {
|
struct pipe_connect_state {
|
||||||
struct dcerpc_pipe *pipe;
|
struct dcerpc_pipe *pipe;
|
||||||
struct dcerpc_binding *binding;
|
struct dcerpc_binding *binding;
|
||||||
const struct dcerpc_interface_table *table;
|
const struct ndr_interface_table *table;
|
||||||
struct cli_credentials *credentials;
|
struct cli_credentials *credentials;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -693,7 +693,7 @@ static void dcerpc_connect_timeout_handler(struct event_context *ev, struct time
|
|||||||
*/
|
*/
|
||||||
struct composite_context* dcerpc_pipe_connect_b_send(TALLOC_CTX *parent_ctx,
|
struct composite_context* dcerpc_pipe_connect_b_send(TALLOC_CTX *parent_ctx,
|
||||||
struct dcerpc_binding *binding,
|
struct dcerpc_binding *binding,
|
||||||
const struct dcerpc_interface_table *table,
|
const struct ndr_interface_table *table,
|
||||||
struct cli_credentials *credentials,
|
struct cli_credentials *credentials,
|
||||||
struct event_context *ev)
|
struct event_context *ev)
|
||||||
{
|
{
|
||||||
@@ -781,7 +781,7 @@ NTSTATUS dcerpc_pipe_connect_b_recv(struct composite_context *c, TALLOC_CTX *mem
|
|||||||
NTSTATUS dcerpc_pipe_connect_b(TALLOC_CTX *parent_ctx,
|
NTSTATUS dcerpc_pipe_connect_b(TALLOC_CTX *parent_ctx,
|
||||||
struct dcerpc_pipe **pp,
|
struct dcerpc_pipe **pp,
|
||||||
struct dcerpc_binding *binding,
|
struct dcerpc_binding *binding,
|
||||||
const struct dcerpc_interface_table *table,
|
const struct ndr_interface_table *table,
|
||||||
struct cli_credentials *credentials,
|
struct cli_credentials *credentials,
|
||||||
struct event_context *ev)
|
struct event_context *ev)
|
||||||
{
|
{
|
||||||
@@ -808,7 +808,7 @@ static void continue_pipe_connect_b(struct composite_context *ctx);
|
|||||||
*/
|
*/
|
||||||
struct composite_context* dcerpc_pipe_connect_send(TALLOC_CTX *parent_ctx,
|
struct composite_context* dcerpc_pipe_connect_send(TALLOC_CTX *parent_ctx,
|
||||||
const char *binding,
|
const char *binding,
|
||||||
const struct dcerpc_interface_table *table,
|
const struct ndr_interface_table *table,
|
||||||
struct cli_credentials *credentials,
|
struct cli_credentials *credentials,
|
||||||
struct event_context *ev)
|
struct event_context *ev)
|
||||||
{
|
{
|
||||||
@@ -904,7 +904,7 @@ NTSTATUS dcerpc_pipe_connect_recv(struct composite_context *c,
|
|||||||
NTSTATUS dcerpc_pipe_connect(TALLOC_CTX *parent_ctx,
|
NTSTATUS dcerpc_pipe_connect(TALLOC_CTX *parent_ctx,
|
||||||
struct dcerpc_pipe **pp,
|
struct dcerpc_pipe **pp,
|
||||||
const char *binding,
|
const char *binding,
|
||||||
const struct dcerpc_interface_table *table,
|
const struct ndr_interface_table *table,
|
||||||
struct cli_credentials *credentials,
|
struct cli_credentials *credentials,
|
||||||
struct event_context *ev)
|
struct event_context *ev)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -285,7 +285,7 @@ NTSTATUS dcerpc_schannel_key_recv(struct composite_context *c)
|
|||||||
struct auth_schannel_state {
|
struct auth_schannel_state {
|
||||||
struct dcerpc_pipe *pipe;
|
struct dcerpc_pipe *pipe;
|
||||||
struct cli_credentials *credentials;
|
struct cli_credentials *credentials;
|
||||||
const struct dcerpc_interface_table *table;
|
const struct ndr_interface_table *table;
|
||||||
uint8_t auth_level;
|
uint8_t auth_level;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -344,7 +344,7 @@ static void continue_bind_auth(struct composite_context *ctx)
|
|||||||
*/
|
*/
|
||||||
struct composite_context *dcerpc_bind_auth_schannel_send(TALLOC_CTX *tmp_ctx,
|
struct composite_context *dcerpc_bind_auth_schannel_send(TALLOC_CTX *tmp_ctx,
|
||||||
struct dcerpc_pipe *p,
|
struct dcerpc_pipe *p,
|
||||||
const struct dcerpc_interface_table *table,
|
const struct ndr_interface_table *table,
|
||||||
struct cli_credentials *credentials,
|
struct cli_credentials *credentials,
|
||||||
uint8_t auth_level)
|
uint8_t auth_level)
|
||||||
{
|
{
|
||||||
@@ -392,7 +392,7 @@ NTSTATUS dcerpc_bind_auth_schannel_recv(struct composite_context *c)
|
|||||||
*/
|
*/
|
||||||
NTSTATUS dcerpc_bind_auth_schannel(TALLOC_CTX *tmp_ctx,
|
NTSTATUS dcerpc_bind_auth_schannel(TALLOC_CTX *tmp_ctx,
|
||||||
struct dcerpc_pipe *p,
|
struct dcerpc_pipe *p,
|
||||||
const struct dcerpc_interface_table *table,
|
const struct ndr_interface_table *table,
|
||||||
struct cli_credentials *credentials,
|
struct cli_credentials *credentials,
|
||||||
uint8_t auth_level)
|
uint8_t auth_level)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -222,7 +222,7 @@ NTSTATUS dcerpc_secondary_connection(struct dcerpc_pipe *p,
|
|||||||
struct sec_auth_conn_state {
|
struct sec_auth_conn_state {
|
||||||
struct dcerpc_pipe *pipe2;
|
struct dcerpc_pipe *pipe2;
|
||||||
struct dcerpc_binding *binding;
|
struct dcerpc_binding *binding;
|
||||||
const struct dcerpc_interface_table *table;
|
const struct ndr_interface_table *table;
|
||||||
struct cli_credentials *credentials;
|
struct cli_credentials *credentials;
|
||||||
struct composite_context *ctx;
|
struct composite_context *ctx;
|
||||||
};
|
};
|
||||||
@@ -232,7 +232,7 @@ static void dcerpc_secondary_auth_connection_continue(struct composite_context *
|
|||||||
|
|
||||||
struct composite_context* dcerpc_secondary_auth_connection_send(struct dcerpc_pipe *p,
|
struct composite_context* dcerpc_secondary_auth_connection_send(struct dcerpc_pipe *p,
|
||||||
struct dcerpc_binding *binding,
|
struct dcerpc_binding *binding,
|
||||||
const struct dcerpc_interface_table *table,
|
const struct ndr_interface_table *table,
|
||||||
struct cli_credentials *credentials)
|
struct cli_credentials *credentials)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
/*
|
/*
|
||||||
find a dcerpc call on an interface by name
|
find a dcerpc call on an interface by name
|
||||||
*/
|
*/
|
||||||
const struct ndr_interface_call *dcerpc_iface_find_call(const struct dcerpc_interface_table *iface,
|
const struct ndr_interface_call *dcerpc_iface_find_call(const struct ndr_interface_table *iface,
|
||||||
const char *name)
|
const char *name)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
@@ -770,7 +770,7 @@ NTSTATUS dcerpc_binding_build_tower(TALLOC_CTX *mem_ctx, struct dcerpc_binding *
|
|||||||
|
|
||||||
struct epm_map_binding_state {
|
struct epm_map_binding_state {
|
||||||
struct dcerpc_binding *binding;
|
struct dcerpc_binding *binding;
|
||||||
const struct dcerpc_interface_table *table;
|
const struct ndr_interface_table *table;
|
||||||
struct dcerpc_pipe *pipe;
|
struct dcerpc_pipe *pipe;
|
||||||
struct policy_handle handle;
|
struct policy_handle handle;
|
||||||
struct GUID guid;
|
struct GUID guid;
|
||||||
@@ -871,7 +871,7 @@ static void continue_epm_map(struct rpc_request *req)
|
|||||||
*/
|
*/
|
||||||
struct composite_context *dcerpc_epm_map_binding_send(TALLOC_CTX *mem_ctx,
|
struct composite_context *dcerpc_epm_map_binding_send(TALLOC_CTX *mem_ctx,
|
||||||
struct dcerpc_binding *binding,
|
struct dcerpc_binding *binding,
|
||||||
const struct dcerpc_interface_table *table,
|
const struct ndr_interface_table *table,
|
||||||
struct event_context *ev)
|
struct event_context *ev)
|
||||||
{
|
{
|
||||||
struct composite_context *c;
|
struct composite_context *c;
|
||||||
@@ -981,7 +981,7 @@ NTSTATUS dcerpc_epm_map_binding_recv(struct composite_context *c)
|
|||||||
Get endpoint mapping for rpc connection
|
Get endpoint mapping for rpc connection
|
||||||
*/
|
*/
|
||||||
NTSTATUS dcerpc_epm_map_binding(TALLOC_CTX *mem_ctx, struct dcerpc_binding *binding,
|
NTSTATUS dcerpc_epm_map_binding(TALLOC_CTX *mem_ctx, struct dcerpc_binding *binding,
|
||||||
const struct dcerpc_interface_table *table, struct event_context *ev)
|
const struct ndr_interface_table *table, struct event_context *ev)
|
||||||
{
|
{
|
||||||
struct composite_context *c;
|
struct composite_context *c;
|
||||||
|
|
||||||
@@ -993,7 +993,7 @@ NTSTATUS dcerpc_epm_map_binding(TALLOC_CTX *mem_ctx, struct dcerpc_binding *bind
|
|||||||
struct pipe_auth_state {
|
struct pipe_auth_state {
|
||||||
struct dcerpc_pipe *pipe;
|
struct dcerpc_pipe *pipe;
|
||||||
struct dcerpc_binding *binding;
|
struct dcerpc_binding *binding;
|
||||||
const struct dcerpc_interface_table *table;
|
const struct ndr_interface_table *table;
|
||||||
struct cli_credentials *credentials;
|
struct cli_credentials *credentials;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1156,7 +1156,7 @@ static void continue_auth_none(struct composite_context *ctx)
|
|||||||
*/
|
*/
|
||||||
struct composite_context *dcerpc_pipe_auth_send(struct dcerpc_pipe *p,
|
struct composite_context *dcerpc_pipe_auth_send(struct dcerpc_pipe *p,
|
||||||
struct dcerpc_binding *binding,
|
struct dcerpc_binding *binding,
|
||||||
const struct dcerpc_interface_table *table,
|
const struct ndr_interface_table *table,
|
||||||
struct cli_credentials *credentials)
|
struct cli_credentials *credentials)
|
||||||
{
|
{
|
||||||
struct composite_context *c;
|
struct composite_context *c;
|
||||||
@@ -1298,7 +1298,7 @@ NTSTATUS dcerpc_pipe_auth_recv(struct composite_context *c, TALLOC_CTX *mem_ctx,
|
|||||||
NTSTATUS dcerpc_pipe_auth(TALLOC_CTX *mem_ctx,
|
NTSTATUS dcerpc_pipe_auth(TALLOC_CTX *mem_ctx,
|
||||||
struct dcerpc_pipe **p,
|
struct dcerpc_pipe **p,
|
||||||
struct dcerpc_binding *binding,
|
struct dcerpc_binding *binding,
|
||||||
const struct dcerpc_interface_table *table,
|
const struct ndr_interface_table *table,
|
||||||
struct cli_credentials *credentials)
|
struct cli_credentials *credentials)
|
||||||
{
|
{
|
||||||
struct composite_context *c;
|
struct composite_context *c;
|
||||||
@@ -1333,7 +1333,7 @@ NTSTATUS dcerpc_fetch_session_key(struct dcerpc_pipe *p,
|
|||||||
|
|
||||||
this triggers on a debug level of >= 10
|
this triggers on a debug level of >= 10
|
||||||
*/
|
*/
|
||||||
void dcerpc_log_packet(const struct dcerpc_interface_table *ndr,
|
void dcerpc_log_packet(const struct ndr_interface_table *ndr,
|
||||||
uint32_t opnum, uint32_t flags, DATA_BLOB *pkt)
|
uint32_t opnum, uint32_t flags, DATA_BLOB *pkt)
|
||||||
{
|
{
|
||||||
const int num_examples = 20;
|
const int num_examples = 20;
|
||||||
@@ -1369,7 +1369,7 @@ void dcerpc_log_packet(const struct dcerpc_interface_table *ndr,
|
|||||||
*/
|
*/
|
||||||
NTSTATUS dcerpc_secondary_context(struct dcerpc_pipe *p,
|
NTSTATUS dcerpc_secondary_context(struct dcerpc_pipe *p,
|
||||||
struct dcerpc_pipe **pp2,
|
struct dcerpc_pipe **pp2,
|
||||||
const struct dcerpc_interface_table *table)
|
const struct ndr_interface_table *table)
|
||||||
{
|
{
|
||||||
NTSTATUS status;
|
NTSTATUS status;
|
||||||
struct dcerpc_pipe *p2;
|
struct dcerpc_pipe *p2;
|
||||||
|
|||||||
@@ -25,14 +25,14 @@
|
|||||||
#include "librpc/rpc/dcerpc.h"
|
#include "librpc/rpc/dcerpc.h"
|
||||||
#include "librpc/rpc/dcerpc_table.h"
|
#include "librpc/rpc/dcerpc_table.h"
|
||||||
|
|
||||||
struct dcerpc_interface_list *dcerpc_pipes = NULL;
|
struct ndr_interface_list *dcerpc_pipes = NULL;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
register a dcerpc client interface
|
register a dcerpc client interface
|
||||||
*/
|
*/
|
||||||
NTSTATUS librpc_register_interface(const struct dcerpc_interface_table *interface)
|
NTSTATUS librpc_register_interface(const struct ndr_interface_table *interface)
|
||||||
{
|
{
|
||||||
struct dcerpc_interface_list *l;
|
struct ndr_interface_list *l;
|
||||||
|
|
||||||
for (l = dcerpc_pipes; l; l = l->next) {
|
for (l = dcerpc_pipes; l; l = l->next) {
|
||||||
if (GUID_equal(&interface->syntax_id.uuid, &l->table->syntax_id.uuid)) {
|
if (GUID_equal(&interface->syntax_id.uuid, &l->table->syntax_id.uuid)) {
|
||||||
@@ -43,7 +43,7 @@ NTSTATUS librpc_register_interface(const struct dcerpc_interface_table *interfac
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
l = talloc(talloc_autofree_context(), struct dcerpc_interface_list);
|
l = talloc(talloc_autofree_context(), struct ndr_interface_list);
|
||||||
l->table = interface;
|
l->table = interface;
|
||||||
|
|
||||||
DLIST_ADD(dcerpc_pipes, l);
|
DLIST_ADD(dcerpc_pipes, l);
|
||||||
@@ -56,7 +56,7 @@ NTSTATUS librpc_register_interface(const struct dcerpc_interface_table *interfac
|
|||||||
*/
|
*/
|
||||||
const char *idl_pipe_name(const struct GUID *uuid, uint32_t if_version)
|
const char *idl_pipe_name(const struct GUID *uuid, uint32_t if_version)
|
||||||
{
|
{
|
||||||
const struct dcerpc_interface_list *l;
|
const struct ndr_interface_list *l;
|
||||||
for (l=librpc_dcerpc_pipes();l;l=l->next) {
|
for (l=librpc_dcerpc_pipes();l;l=l->next) {
|
||||||
if (GUID_equal(&l->table->syntax_id.uuid, uuid) &&
|
if (GUID_equal(&l->table->syntax_id.uuid, uuid) &&
|
||||||
l->table->syntax_id.if_version == if_version) {
|
l->table->syntax_id.if_version == if_version) {
|
||||||
@@ -71,7 +71,7 @@ const char *idl_pipe_name(const struct GUID *uuid, uint32_t if_version)
|
|||||||
*/
|
*/
|
||||||
int idl_num_calls(const struct GUID *uuid, uint32_t if_version)
|
int idl_num_calls(const struct GUID *uuid, uint32_t if_version)
|
||||||
{
|
{
|
||||||
const struct dcerpc_interface_list *l;
|
const struct ndr_interface_list *l;
|
||||||
for (l=librpc_dcerpc_pipes();l;l=l->next){
|
for (l=librpc_dcerpc_pipes();l;l=l->next){
|
||||||
if (GUID_equal(&l->table->syntax_id.uuid, uuid) &&
|
if (GUID_equal(&l->table->syntax_id.uuid, uuid) &&
|
||||||
l->table->syntax_id.if_version == if_version) {
|
l->table->syntax_id.if_version == if_version) {
|
||||||
@@ -85,9 +85,9 @@ int idl_num_calls(const struct GUID *uuid, uint32_t if_version)
|
|||||||
/*
|
/*
|
||||||
find a dcerpc interface by name
|
find a dcerpc interface by name
|
||||||
*/
|
*/
|
||||||
const struct dcerpc_interface_table *idl_iface_by_name(const char *name)
|
const struct ndr_interface_table *idl_iface_by_name(const char *name)
|
||||||
{
|
{
|
||||||
const struct dcerpc_interface_list *l;
|
const struct ndr_interface_list *l;
|
||||||
for (l=librpc_dcerpc_pipes();l;l=l->next) {
|
for (l=librpc_dcerpc_pipes();l;l=l->next) {
|
||||||
if (strcasecmp(l->table->name, name) == 0) {
|
if (strcasecmp(l->table->name, name) == 0) {
|
||||||
return l->table;
|
return l->table;
|
||||||
@@ -99,9 +99,9 @@ const struct dcerpc_interface_table *idl_iface_by_name(const char *name)
|
|||||||
/*
|
/*
|
||||||
find a dcerpc interface by uuid
|
find a dcerpc interface by uuid
|
||||||
*/
|
*/
|
||||||
const struct dcerpc_interface_table *idl_iface_by_uuid(const struct GUID *uuid)
|
const struct ndr_interface_table *idl_iface_by_uuid(const struct GUID *uuid)
|
||||||
{
|
{
|
||||||
const struct dcerpc_interface_list *l;
|
const struct ndr_interface_list *l;
|
||||||
for (l=librpc_dcerpc_pipes();l;l=l->next) {
|
for (l=librpc_dcerpc_pipes();l;l=l->next) {
|
||||||
if (GUID_equal(&l->table->syntax_id.uuid, uuid)) {
|
if (GUID_equal(&l->table->syntax_id.uuid, uuid)) {
|
||||||
return l->table;
|
return l->table;
|
||||||
@@ -113,7 +113,7 @@ const struct dcerpc_interface_table *idl_iface_by_uuid(const struct GUID *uuid)
|
|||||||
/*
|
/*
|
||||||
return the list of registered dcerpc_pipes
|
return the list of registered dcerpc_pipes
|
||||||
*/
|
*/
|
||||||
const struct dcerpc_interface_list *librpc_dcerpc_pipes(void)
|
const struct ndr_interface_list *librpc_dcerpc_pipes(void)
|
||||||
{
|
{
|
||||||
return dcerpc_pipes;
|
return dcerpc_pipes;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ sub process_file($)
|
|||||||
my $found = 0;
|
my $found = 0;
|
||||||
|
|
||||||
while (my $line = <FILE>) {
|
while (my $line = <FILE>) {
|
||||||
if ($line =~ /extern const struct dcerpc_interface_table (\w+);/) {
|
if ($line =~ /extern const struct ndr_interface_table (\w+);/) {
|
||||||
$found = 1;
|
$found = 1;
|
||||||
$init_fns.="\tstatus = librpc_register_interface(&$1);\n";
|
$init_fns.="\tstatus = librpc_register_interface(&$1);\n";
|
||||||
$init_fns.="\tif (NT_STATUS_IS_ERR(status)) return status;\n\n";
|
$init_fns.="\tif (NT_STATUS_IS_ERR(status)) return status;\n\n";
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
static const struct ndr_interface_call *find_function(
|
static const struct ndr_interface_call *find_function(
|
||||||
const struct dcerpc_interface_table *p,
|
const struct ndr_interface_table *p,
|
||||||
const char *function)
|
const char *function)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
@@ -52,7 +52,7 @@ static const struct ndr_interface_call *find_function(
|
|||||||
|
|
||||||
static void show_pipes(void)
|
static void show_pipes(void)
|
||||||
{
|
{
|
||||||
const struct dcerpc_interface_list *l;
|
const struct ndr_interface_list *l;
|
||||||
printf("\nYou must specify a pipe\n");
|
printf("\nYou must specify a pipe\n");
|
||||||
printf("known pipes are:\n");
|
printf("known pipes are:\n");
|
||||||
for (l=librpc_dcerpc_pipes();l;l=l->next) {
|
for (l=librpc_dcerpc_pipes();l;l=l->next) {
|
||||||
@@ -67,7 +67,7 @@ static void show_pipes(void)
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void show_functions(const struct dcerpc_interface_table *p)
|
static void show_functions(const struct ndr_interface_table *p)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
printf("\nYou must specify a function\n");
|
printf("\nYou must specify a function\n");
|
||||||
@@ -104,9 +104,9 @@ static char *stdin_load(TALLOC_CTX *mem_ctx, size_t *size)
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
const struct dcerpc_interface_table *load_iface_from_plugin(const char *plugin, const char *pipe_name)
|
const struct ndr_interface_table *load_iface_from_plugin(const char *plugin, const char *pipe_name)
|
||||||
{
|
{
|
||||||
const struct dcerpc_interface_table *p;
|
const struct ndr_interface_table *p;
|
||||||
void *handle;
|
void *handle;
|
||||||
char *symbol;
|
char *symbol;
|
||||||
|
|
||||||
@@ -132,7 +132,7 @@ const struct dcerpc_interface_table *load_iface_from_plugin(const char *plugin,
|
|||||||
|
|
||||||
int main(int argc, const char *argv[])
|
int main(int argc, const char *argv[])
|
||||||
{
|
{
|
||||||
const struct dcerpc_interface_table *p = NULL;
|
const struct ndr_interface_table *p = NULL;
|
||||||
const struct ndr_interface_call *f;
|
const struct ndr_interface_call *f;
|
||||||
const char *pipe_name, *function, *inout, *filename;
|
const char *pipe_name, *function, *inout, *filename;
|
||||||
uint8_t *data;
|
uint8_t *data;
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ sub ParseInterface($)
|
|||||||
$res_hdr .= "#define _HEADER_RPC_$interface->{NAME}\n\n";
|
$res_hdr .= "#define _HEADER_RPC_$interface->{NAME}\n\n";
|
||||||
|
|
||||||
if (defined $interface->{PROPERTIES}->{uuid}) {
|
if (defined $interface->{PROPERTIES}->{uuid}) {
|
||||||
$res_hdr .= "extern const struct dcerpc_interface_table dcerpc_table_$interface->{NAME};\n";
|
$res_hdr .= "extern const struct ndr_interface_table dcerpc_table_$interface->{NAME};\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
$res .= "/* $interface->{NAME} - client functions generated by pidl */\n\n";
|
$res .= "/* $interface->{NAME} - client functions generated by pidl */\n\n";
|
||||||
|
|||||||
@@ -2333,7 +2333,7 @@ sub FunctionTable($$)
|
|||||||
$self->pidl("};");
|
$self->pidl("};");
|
||||||
$self->pidl("");
|
$self->pidl("");
|
||||||
|
|
||||||
$self->pidl("\nconst struct dcerpc_interface_table dcerpc_table_$interface->{NAME} = {");
|
$self->pidl("\nconst struct ndr_interface_table dcerpc_table_$interface->{NAME} = {");
|
||||||
$self->pidl("\t.name\t\t= \"$interface->{NAME}\",");
|
$self->pidl("\t.name\t\t= \"$interface->{NAME}\",");
|
||||||
$self->pidl("\t.syntax_id\t= {");
|
$self->pidl("\t.syntax_id\t= {");
|
||||||
$self->pidl("\t\t" . print_uuid($interface->{UUID}) .",");
|
$self->pidl("\t\t" . print_uuid($interface->{UUID}) .",");
|
||||||
@@ -2406,7 +2406,7 @@ sub HeaderInterface($$)
|
|||||||
if(!defined $interface->{PROPERTIES}->{helpstring}) { $interface->{PROPERTIES}->{helpstring} = "NULL"; }
|
if(!defined $interface->{PROPERTIES}->{helpstring}) { $interface->{PROPERTIES}->{helpstring} = "NULL"; }
|
||||||
$self->pidl_hdr("#define DCERPC_$name\_HELPSTRING $interface->{PROPERTIES}->{helpstring}");
|
$self->pidl_hdr("#define DCERPC_$name\_HELPSTRING $interface->{PROPERTIES}->{helpstring}");
|
||||||
|
|
||||||
$self->pidl_hdr("extern const struct dcerpc_interface_table dcerpc_table_$interface->{NAME};");
|
$self->pidl_hdr("extern const struct ndr_interface_table dcerpc_table_$interface->{NAME};");
|
||||||
$self->pidl_hdr("NTSTATUS dcerpc_server_$interface->{NAME}_init(void);");
|
$self->pidl_hdr("NTSTATUS dcerpc_server_$interface->{NAME}_init(void);");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ static NTSTATUS remote_op_reply(struct dcesrv_call_state *dce_call, TALLOC_CTX *
|
|||||||
static NTSTATUS remote_op_bind(struct dcesrv_call_state *dce_call, const struct dcesrv_interface *iface)
|
static NTSTATUS remote_op_bind(struct dcesrv_call_state *dce_call, const struct dcesrv_interface *iface)
|
||||||
{
|
{
|
||||||
NTSTATUS status;
|
NTSTATUS status;
|
||||||
const struct dcerpc_interface_table *table;
|
const struct ndr_interface_table *table;
|
||||||
struct dcesrv_remote_private *private;
|
struct dcesrv_remote_private *private;
|
||||||
const char *binding = lp_parm_string(-1, "dcerpc_remote", "binding");
|
const char *binding = lp_parm_string(-1, "dcerpc_remote", "binding");
|
||||||
const char *user, *pass, *domain;
|
const char *user, *pass, *domain;
|
||||||
@@ -124,7 +124,7 @@ static void remote_op_unbind(struct dcesrv_connection_context *context, const st
|
|||||||
static NTSTATUS remote_op_ndr_pull(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct ndr_pull *pull, void **r)
|
static NTSTATUS remote_op_ndr_pull(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct ndr_pull *pull, void **r)
|
||||||
{
|
{
|
||||||
NTSTATUS status;
|
NTSTATUS status;
|
||||||
const struct dcerpc_interface_table *table = dce_call->context->iface->private;
|
const struct ndr_interface_table *table = dce_call->context->iface->private;
|
||||||
uint16_t opnum = dce_call->pkt.u.request.opnum;
|
uint16_t opnum = dce_call->pkt.u.request.opnum;
|
||||||
|
|
||||||
dce_call->fault_code = 0;
|
dce_call->fault_code = 0;
|
||||||
@@ -155,7 +155,7 @@ static NTSTATUS remote_op_dispatch(struct dcesrv_call_state *dce_call, TALLOC_CT
|
|||||||
{
|
{
|
||||||
struct dcesrv_remote_private *private = dce_call->context->private;
|
struct dcesrv_remote_private *private = dce_call->context->private;
|
||||||
uint16_t opnum = dce_call->pkt.u.request.opnum;
|
uint16_t opnum = dce_call->pkt.u.request.opnum;
|
||||||
const struct dcerpc_interface_table *table = dce_call->context->iface->private;
|
const struct ndr_interface_table *table = dce_call->context->iface->private;
|
||||||
const struct ndr_interface_call *call;
|
const struct ndr_interface_call *call;
|
||||||
const char *name;
|
const char *name;
|
||||||
|
|
||||||
@@ -188,7 +188,7 @@ static NTSTATUS remote_op_dispatch(struct dcesrv_call_state *dce_call, TALLOC_CT
|
|||||||
static NTSTATUS remote_op_ndr_push(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct ndr_push *push, const void *r)
|
static NTSTATUS remote_op_ndr_push(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct ndr_push *push, const void *r)
|
||||||
{
|
{
|
||||||
NTSTATUS status;
|
NTSTATUS status;
|
||||||
const struct dcerpc_interface_table *table = dce_call->context->iface->private;
|
const struct ndr_interface_table *table = dce_call->context->iface->private;
|
||||||
uint16_t opnum = dce_call->pkt.u.request.opnum;
|
uint16_t opnum = dce_call->pkt.u.request.opnum;
|
||||||
|
|
||||||
/* unravel the NDR for the packet */
|
/* unravel the NDR for the packet */
|
||||||
@@ -204,7 +204,7 @@ static NTSTATUS remote_op_ndr_push(struct dcesrv_call_state *dce_call, TALLOC_CT
|
|||||||
static NTSTATUS remote_register_one_iface(struct dcesrv_context *dce_ctx, const struct dcesrv_interface *iface)
|
static NTSTATUS remote_register_one_iface(struct dcesrv_context *dce_ctx, const struct dcesrv_interface *iface)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
const struct dcerpc_interface_table *table = iface->private;
|
const struct ndr_interface_table *table = iface->private;
|
||||||
|
|
||||||
for (i=0;i<table->endpoints->count;i++) {
|
for (i=0;i<table->endpoints->count;i++) {
|
||||||
NTSTATUS ret;
|
NTSTATUS ret;
|
||||||
@@ -252,7 +252,7 @@ static NTSTATUS remote_op_init_server(struct dcesrv_context *dce_ctx, const stru
|
|||||||
return NT_STATUS_OK;
|
return NT_STATUS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static BOOL remote_fill_interface(struct dcesrv_interface *iface, const struct dcerpc_interface_table *if_tabl)
|
static BOOL remote_fill_interface(struct dcesrv_interface *iface, const struct ndr_interface_table *if_tabl)
|
||||||
{
|
{
|
||||||
iface->name = if_tabl->name;
|
iface->name = if_tabl->name;
|
||||||
iface->syntax_id = if_tabl->syntax_id;
|
iface->syntax_id = if_tabl->syntax_id;
|
||||||
@@ -272,7 +272,7 @@ static BOOL remote_fill_interface(struct dcesrv_interface *iface, const struct d
|
|||||||
|
|
||||||
static BOOL remote_op_interface_by_uuid(struct dcesrv_interface *iface, const struct GUID *uuid, uint32_t if_version)
|
static BOOL remote_op_interface_by_uuid(struct dcesrv_interface *iface, const struct GUID *uuid, uint32_t if_version)
|
||||||
{
|
{
|
||||||
const struct dcerpc_interface_list *l;
|
const struct ndr_interface_list *l;
|
||||||
|
|
||||||
for (l=librpc_dcerpc_pipes();l;l=l->next) {
|
for (l=librpc_dcerpc_pipes();l;l=l->next) {
|
||||||
if (l->table->syntax_id.if_version == if_version &&
|
if (l->table->syntax_id.if_version == if_version &&
|
||||||
@@ -286,7 +286,7 @@ static BOOL remote_op_interface_by_uuid(struct dcesrv_interface *iface, const st
|
|||||||
|
|
||||||
static BOOL remote_op_interface_by_name(struct dcesrv_interface *iface, const char *name)
|
static BOOL remote_op_interface_by_name(struct dcesrv_interface *iface, const char *name)
|
||||||
{
|
{
|
||||||
const struct dcerpc_interface_table *tbl = idl_iface_by_name(name);
|
const struct ndr_interface_table *tbl = idl_iface_by_name(name);
|
||||||
|
|
||||||
if (tbl)
|
if (tbl)
|
||||||
return remote_fill_interface(iface, tbl);
|
return remote_fill_interface(iface, tbl);
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ NTSTATUS smbcalls_register_ejs(const char *name, MprCFunction fn);
|
|||||||
|
|
||||||
|
|
||||||
int ejs_rpc_call(int eid, int argc, struct MprVar **argv,
|
int ejs_rpc_call(int eid, int argc, struct MprVar **argv,
|
||||||
const struct dcerpc_interface_table *iface, int callnum,
|
const struct ndr_interface_table *iface, int callnum,
|
||||||
ejs_pull_function_t ejs_pull, ejs_push_function_t ejs_push);
|
ejs_pull_function_t ejs_pull, ejs_push_function_t ejs_push);
|
||||||
|
|
||||||
NTSTATUS ejs_pull_struct_start(struct ejs_rpc *ejs, struct MprVar **v, const char *name);
|
NTSTATUS ejs_pull_struct_start(struct ejs_rpc *ejs, struct MprVar **v, const char *name);
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ static int ejs_irpc_connect(MprVarHandle eid, int argc, char **argv)
|
|||||||
static int ejs_rpc_connect(MprVarHandle eid, int argc, char **argv)
|
static int ejs_rpc_connect(MprVarHandle eid, int argc, char **argv)
|
||||||
{
|
{
|
||||||
const char *binding, *pipe_name;
|
const char *binding, *pipe_name;
|
||||||
const struct dcerpc_interface_table *iface;
|
const struct ndr_interface_table *iface;
|
||||||
NTSTATUS status;
|
NTSTATUS status;
|
||||||
struct dcerpc_pipe *p;
|
struct dcerpc_pipe *p;
|
||||||
struct cli_credentials *creds;
|
struct cli_credentials *creds;
|
||||||
@@ -176,7 +176,7 @@ done:
|
|||||||
make an irpc call - called via the same interface as rpc
|
make an irpc call - called via the same interface as rpc
|
||||||
*/
|
*/
|
||||||
static int ejs_irpc_call(int eid, struct MprVar *io,
|
static int ejs_irpc_call(int eid, struct MprVar *io,
|
||||||
const struct dcerpc_interface_table *iface, int callnum,
|
const struct ndr_interface_table *iface, int callnum,
|
||||||
ejs_pull_function_t ejs_pull, ejs_push_function_t ejs_push)
|
ejs_pull_function_t ejs_pull, ejs_push_function_t ejs_push)
|
||||||
{
|
{
|
||||||
NTSTATUS status;
|
NTSTATUS status;
|
||||||
@@ -276,7 +276,7 @@ done:
|
|||||||
code
|
code
|
||||||
*/
|
*/
|
||||||
int ejs_rpc_call(int eid, int argc, struct MprVar **argv,
|
int ejs_rpc_call(int eid, int argc, struct MprVar **argv,
|
||||||
const struct dcerpc_interface_table *iface, int callnum,
|
const struct ndr_interface_table *iface, int callnum,
|
||||||
ejs_pull_function_t ejs_pull, ejs_push_function_t ejs_push)
|
ejs_pull_function_t ejs_pull, ejs_push_function_t ejs_push)
|
||||||
{
|
{
|
||||||
struct MprVar *io;
|
struct MprVar *io;
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
|
|
||||||
static BOOL test_connect_service(struct libnet_context *ctx,
|
static BOOL test_connect_service(struct libnet_context *ctx,
|
||||||
const struct dcerpc_interface_table *iface,
|
const struct ndr_interface_table *iface,
|
||||||
const char *binding_string,
|
const char *binding_string,
|
||||||
const char *hostname,
|
const char *hostname,
|
||||||
const enum libnet_RpcConnect_level level,
|
const enum libnet_RpcConnect_level level,
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ BOOL torture_rpc_alter_context(struct torture_context *torture)
|
|||||||
TALLOC_CTX *mem_ctx;
|
TALLOC_CTX *mem_ctx;
|
||||||
BOOL ret = True;
|
BOOL ret = True;
|
||||||
struct policy_handle *handle;
|
struct policy_handle *handle;
|
||||||
struct dcerpc_interface_table tmptbl;
|
struct ndr_interface_table tmptbl;
|
||||||
struct ndr_syntax_id syntax;
|
struct ndr_syntax_id syntax;
|
||||||
struct ndr_syntax_id transfer_syntax;
|
struct ndr_syntax_id transfer_syntax;
|
||||||
|
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ BOOL torture_async_bind(struct torture_context *torture)
|
|||||||
|
|
||||||
struct composite_context **bind_req;
|
struct composite_context **bind_req;
|
||||||
struct dcerpc_pipe **pipe;
|
struct dcerpc_pipe **pipe;
|
||||||
const struct dcerpc_interface_table **table;
|
const struct ndr_interface_table **table;
|
||||||
|
|
||||||
if (!torture_setting_bool(torture, "async", False)) {
|
if (!torture_setting_bool(torture, "async", False)) {
|
||||||
printf("async bind test disabled - enable async tests to use\n");
|
printf("async bind test disabled - enable async tests to use\n");
|
||||||
@@ -64,7 +64,7 @@ BOOL torture_async_bind(struct torture_context *torture)
|
|||||||
if (bind_req == NULL) return False;
|
if (bind_req == NULL) return False;
|
||||||
pipe = talloc_array(torture, struct dcerpc_pipe*, torture_numasync);
|
pipe = talloc_array(torture, struct dcerpc_pipe*, torture_numasync);
|
||||||
if (pipe == NULL) return False;
|
if (pipe == NULL) return False;
|
||||||
table = talloc_array(torture, const struct dcerpc_interface_table*, torture_numasync);
|
table = talloc_array(torture, const struct ndr_interface_table*, torture_numasync);
|
||||||
if (table == NULL) return False;
|
if (table == NULL) return False;
|
||||||
|
|
||||||
/* credentials */
|
/* credentials */
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ static void fill_blob_handle(DATA_BLOB *blob, TALLOC_CTX *mem_ctx,
|
|||||||
|
|
||||||
static void reopen(TALLOC_CTX *mem_ctx,
|
static void reopen(TALLOC_CTX *mem_ctx,
|
||||||
struct dcerpc_pipe **p,
|
struct dcerpc_pipe **p,
|
||||||
const struct dcerpc_interface_table *iface)
|
const struct ndr_interface_table *iface)
|
||||||
{
|
{
|
||||||
NTSTATUS status;
|
NTSTATUS status;
|
||||||
|
|
||||||
@@ -111,10 +111,10 @@ static void print_depth(int depth)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_ptr_scan(TALLOC_CTX *mem_ctx, const struct dcerpc_interface_table *iface,
|
static void test_ptr_scan(TALLOC_CTX *mem_ctx, const struct ndr_interface_table *iface,
|
||||||
int opnum, DATA_BLOB *base_in, int min_ofs, int max_ofs, int depth);
|
int opnum, DATA_BLOB *base_in, int min_ofs, int max_ofs, int depth);
|
||||||
|
|
||||||
static void try_expand(TALLOC_CTX *mem_ctx, const struct dcerpc_interface_table *iface,
|
static void try_expand(TALLOC_CTX *mem_ctx, const struct ndr_interface_table *iface,
|
||||||
int opnum, DATA_BLOB *base_in, int insert_ofs, int depth)
|
int opnum, DATA_BLOB *base_in, int insert_ofs, int depth)
|
||||||
{
|
{
|
||||||
DATA_BLOB stub_in, stub_out;
|
DATA_BLOB stub_in, stub_out;
|
||||||
@@ -156,7 +156,7 @@ static void try_expand(TALLOC_CTX *mem_ctx, const struct dcerpc_interface_table
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void test_ptr_scan(TALLOC_CTX *mem_ctx, const struct dcerpc_interface_table *iface,
|
static void test_ptr_scan(TALLOC_CTX *mem_ctx, const struct ndr_interface_table *iface,
|
||||||
int opnum, DATA_BLOB *base_in, int min_ofs, int max_ofs, int depth)
|
int opnum, DATA_BLOB *base_in, int min_ofs, int max_ofs, int depth)
|
||||||
{
|
{
|
||||||
DATA_BLOB stub_in, stub_out;
|
DATA_BLOB stub_in, stub_out;
|
||||||
@@ -196,7 +196,7 @@ static void test_ptr_scan(TALLOC_CTX *mem_ctx, const struct dcerpc_interface_tab
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void test_scan_call(TALLOC_CTX *mem_ctx, const struct dcerpc_interface_table *iface, int opnum)
|
static void test_scan_call(TALLOC_CTX *mem_ctx, const struct ndr_interface_table *iface, int opnum)
|
||||||
{
|
{
|
||||||
DATA_BLOB stub_in, stub_out;
|
DATA_BLOB stub_in, stub_out;
|
||||||
int i;
|
int i;
|
||||||
@@ -254,7 +254,7 @@ static void test_scan_call(TALLOC_CTX *mem_ctx, const struct dcerpc_interface_ta
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void test_auto_scan(TALLOC_CTX *mem_ctx, const struct dcerpc_interface_table *iface)
|
static void test_auto_scan(TALLOC_CTX *mem_ctx, const struct ndr_interface_table *iface)
|
||||||
{
|
{
|
||||||
test_scan_call(mem_ctx, iface, 2);
|
test_scan_call(mem_ctx, iface, 2);
|
||||||
}
|
}
|
||||||
@@ -262,7 +262,7 @@ static void test_auto_scan(TALLOC_CTX *mem_ctx, const struct dcerpc_interface_ta
|
|||||||
BOOL torture_rpc_autoidl(struct torture_context *torture)
|
BOOL torture_rpc_autoidl(struct torture_context *torture)
|
||||||
{
|
{
|
||||||
TALLOC_CTX *mem_ctx;
|
TALLOC_CTX *mem_ctx;
|
||||||
const struct dcerpc_interface_table *iface;
|
const struct ndr_interface_table *iface;
|
||||||
|
|
||||||
iface = idl_iface_by_name("drsuapi");
|
iface = idl_iface_by_name("drsuapi");
|
||||||
if (!iface) {
|
if (!iface) {
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
|
|
||||||
BOOL count_calls(TALLOC_CTX *mem_ctx,
|
BOOL count_calls(TALLOC_CTX *mem_ctx,
|
||||||
const struct dcerpc_interface_table *iface,
|
const struct ndr_interface_table *iface,
|
||||||
BOOL all)
|
BOOL all)
|
||||||
{
|
{
|
||||||
struct dcerpc_pipe *p;
|
struct dcerpc_pipe *p;
|
||||||
@@ -102,10 +102,10 @@ BOOL count_calls(TALLOC_CTX *mem_ctx,
|
|||||||
|
|
||||||
BOOL torture_rpc_countcalls(struct torture_context *torture)
|
BOOL torture_rpc_countcalls(struct torture_context *torture)
|
||||||
{
|
{
|
||||||
const struct dcerpc_interface_table *iface;
|
const struct ndr_interface_table *iface;
|
||||||
const char *iface_name;
|
const char *iface_name;
|
||||||
BOOL ret = True;
|
BOOL ret = True;
|
||||||
const struct dcerpc_interface_list *l;
|
const struct ndr_interface_list *l;
|
||||||
TALLOC_CTX *mem_ctx = talloc_named(torture, 0, "torture_rpc_countcalls context");
|
TALLOC_CTX *mem_ctx = talloc_named(torture, 0, "torture_rpc_countcalls context");
|
||||||
if (!mem_ctx) {
|
if (!mem_ctx) {
|
||||||
return False;
|
return False;
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
ask the server what interface IDs are available on this endpoint
|
ask the server what interface IDs are available on this endpoint
|
||||||
*/
|
*/
|
||||||
BOOL test_inq_if_ids(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
|
BOOL test_inq_if_ids(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
|
||||||
BOOL (*per_id_test)(const struct dcerpc_interface_table *iface,
|
BOOL (*per_id_test)(const struct ndr_interface_table *iface,
|
||||||
TALLOC_CTX *mem_ctx,
|
TALLOC_CTX *mem_ctx,
|
||||||
struct ndr_syntax_id *id),
|
struct ndr_syntax_id *id),
|
||||||
const void *priv)
|
const void *priv)
|
||||||
@@ -194,7 +194,7 @@ BOOL torture_rpc_mgmt(struct torture_context *torture)
|
|||||||
TALLOC_CTX *mem_ctx, *loop_ctx;
|
TALLOC_CTX *mem_ctx, *loop_ctx;
|
||||||
BOOL ret = True;
|
BOOL ret = True;
|
||||||
const char *binding = torture_setting_string(torture, "binding", NULL);
|
const char *binding = torture_setting_string(torture, "binding", NULL);
|
||||||
const struct dcerpc_interface_list *l;
|
const struct ndr_interface_list *l;
|
||||||
struct dcerpc_binding *b;
|
struct dcerpc_binding *b;
|
||||||
|
|
||||||
mem_ctx = talloc_init("torture_rpc_mgmt");
|
mem_ctx = talloc_init("torture_rpc_mgmt");
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
/* open a rpc connection to the chosen binding string */
|
/* open a rpc connection to the chosen binding string */
|
||||||
_PUBLIC_ NTSTATUS torture_rpc_connection(TALLOC_CTX *parent_ctx,
|
_PUBLIC_ NTSTATUS torture_rpc_connection(TALLOC_CTX *parent_ctx,
|
||||||
struct dcerpc_pipe **p,
|
struct dcerpc_pipe **p,
|
||||||
const struct dcerpc_interface_table *table)
|
const struct ndr_interface_table *table)
|
||||||
{
|
{
|
||||||
NTSTATUS status;
|
NTSTATUS status;
|
||||||
const char *binding = lp_parm_string(-1, "torture", "binding");
|
const char *binding = lp_parm_string(-1, "torture", "binding");
|
||||||
@@ -54,7 +54,7 @@ _PUBLIC_ NTSTATUS torture_rpc_connection(TALLOC_CTX *parent_ctx,
|
|||||||
/* open a rpc connection to a specific transport */
|
/* open a rpc connection to a specific transport */
|
||||||
NTSTATUS torture_rpc_connection_transport(TALLOC_CTX *parent_ctx,
|
NTSTATUS torture_rpc_connection_transport(TALLOC_CTX *parent_ctx,
|
||||||
struct dcerpc_pipe **p,
|
struct dcerpc_pipe **p,
|
||||||
const struct dcerpc_interface_table *table,
|
const struct ndr_interface_table *table,
|
||||||
enum dcerpc_transport_t transport,
|
enum dcerpc_transport_t transport,
|
||||||
uint32_t assoc_group_id)
|
uint32_t assoc_group_id)
|
||||||
{
|
{
|
||||||
@@ -97,7 +97,7 @@ static bool torture_rpc_setup (struct torture_context *tctx, void **data)
|
|||||||
|
|
||||||
status = torture_rpc_connection(tctx,
|
status = torture_rpc_connection(tctx,
|
||||||
(struct dcerpc_pipe **)data,
|
(struct dcerpc_pipe **)data,
|
||||||
(const struct dcerpc_interface_table *)tctx->active_tcase->data);
|
(const struct ndr_interface_table *)tctx->active_tcase->data);
|
||||||
|
|
||||||
torture_assert_ntstatus_ok(tctx, status, "Error connecting to server");
|
torture_assert_ntstatus_ok(tctx, status, "Error connecting to server");
|
||||||
|
|
||||||
@@ -112,7 +112,7 @@ static bool torture_rpc_teardown (struct torture_context *tcase, void *data)
|
|||||||
|
|
||||||
_PUBLIC_ struct torture_tcase *torture_suite_add_rpc_iface_tcase(struct torture_suite *suite,
|
_PUBLIC_ struct torture_tcase *torture_suite_add_rpc_iface_tcase(struct torture_suite *suite,
|
||||||
const char *name,
|
const char *name,
|
||||||
const struct dcerpc_interface_table *table)
|
const struct ndr_interface_table *table)
|
||||||
{
|
{
|
||||||
struct torture_tcase *tcase = torture_suite_add_tcase(suite, name);
|
struct torture_tcase *tcase = torture_suite_add_tcase(suite, name);
|
||||||
|
|
||||||
|
|||||||
@@ -1368,7 +1368,7 @@ BOOL torture_samba3_sessionkey(struct torture_context *torture)
|
|||||||
static NTSTATUS pipe_bind_smb(TALLOC_CTX *mem_ctx,
|
static NTSTATUS pipe_bind_smb(TALLOC_CTX *mem_ctx,
|
||||||
struct smbcli_tree *tree,
|
struct smbcli_tree *tree,
|
||||||
const char *pipe_name,
|
const char *pipe_name,
|
||||||
const struct dcerpc_interface_table *iface,
|
const struct ndr_interface_table *iface,
|
||||||
struct dcerpc_pipe **p)
|
struct dcerpc_pipe **p)
|
||||||
{
|
{
|
||||||
struct dcerpc_pipe *result;
|
struct dcerpc_pipe *result;
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
/*
|
/*
|
||||||
work out how many calls there are for an interface
|
work out how many calls there are for an interface
|
||||||
*/
|
*/
|
||||||
static BOOL test_num_calls(const struct dcerpc_interface_table *iface,
|
static BOOL test_num_calls(const struct ndr_interface_table *iface,
|
||||||
TALLOC_CTX *mem_ctx,
|
TALLOC_CTX *mem_ctx,
|
||||||
struct ndr_syntax_id *id)
|
struct ndr_syntax_id *id)
|
||||||
{
|
{
|
||||||
@@ -37,7 +37,7 @@ static BOOL test_num_calls(const struct dcerpc_interface_table *iface,
|
|||||||
int i;
|
int i;
|
||||||
DATA_BLOB stub_in, stub_out;
|
DATA_BLOB stub_in, stub_out;
|
||||||
int idl_calls;
|
int idl_calls;
|
||||||
struct dcerpc_interface_table tbl;
|
struct ndr_interface_table tbl;
|
||||||
|
|
||||||
/* FIXME: This should be fixed when torture_rpc_connection
|
/* FIXME: This should be fixed when torture_rpc_connection
|
||||||
* takes a ndr_syntax_id */
|
* takes a ndr_syntax_id */
|
||||||
@@ -98,7 +98,7 @@ BOOL torture_rpc_scanner(struct torture_context *torture)
|
|||||||
struct dcerpc_pipe *p;
|
struct dcerpc_pipe *p;
|
||||||
TALLOC_CTX *mem_ctx, *loop_ctx;
|
TALLOC_CTX *mem_ctx, *loop_ctx;
|
||||||
BOOL ret = True;
|
BOOL ret = True;
|
||||||
const struct dcerpc_interface_list *l;
|
const struct ndr_interface_list *l;
|
||||||
const char *binding = torture_setting_string(torture, "binding", NULL);
|
const char *binding = torture_setting_string(torture, "binding", NULL);
|
||||||
struct dcerpc_binding *b;
|
struct dcerpc_binding *b;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user