summaryrefslogtreecommitdiff
path: root/source4/librpc/rpc/dcerpc_auth.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-12-27 14:28:01 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:47:48 -0500
commitacd6a086b341096fcbea1775ce748587fcc8020a (patch)
tree202c9407be50a6fe215c4e6ab7ccaf843807b6c3 /source4/librpc/rpc/dcerpc_auth.c
parent1f8bb5bd8552bb02204225e312ab36e7844920c1 (diff)
downloadsamba-acd6a086b341096fcbea1775ce748587fcc8020a.tar.gz
samba-acd6a086b341096fcbea1775ce748587fcc8020a.tar.bz2
samba-acd6a086b341096fcbea1775ce748587fcc8020a.zip
r12510: Change the DCE/RPC interfaces to take a pointer to a
dcerpc_interface_table struct rather then a tuple of interface name, UUID and version. This removes the requirement for having a global list of DCE/RPC interfaces, except for these parts of the code that use that list explicitly (ndrdump and the scanner torture test). This should also allow us to remove the hack that put the authservice parameter in the dcerpc_binding struct as it can now be read directly from dcerpc_interface_table. I will now modify some of these functions to take a dcerpc_syntax_id structure rather then a full dcerpc_interface_table. (This used to be commit 8aae0f168e54c01d0866ad6e0da141dbd828574f)
Diffstat (limited to 'source4/librpc/rpc/dcerpc_auth.c')
-rw-r--r--source4/librpc/rpc/dcerpc_auth.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/source4/librpc/rpc/dcerpc_auth.c b/source4/librpc/rpc/dcerpc_auth.c
index dcf3334212..c66384a3cf 100644
--- a/source4/librpc/rpc/dcerpc_auth.c
+++ b/source4/librpc/rpc/dcerpc_auth.c
@@ -31,8 +31,7 @@
struct composite_context *dcerpc_bind_auth_none_send(TALLOC_CTX *mem_ctx,
struct dcerpc_pipe *p,
- const char *uuid,
- uint_t version)
+ const struct dcerpc_interface_table *table)
{
struct dcerpc_syntax_id syntax;
struct dcerpc_syntax_id transfer_syntax;
@@ -42,7 +41,7 @@ struct composite_context *dcerpc_bind_auth_none_send(TALLOC_CTX *mem_ctx,
c = talloc_zero(mem_ctx, struct composite_context);
if (c == NULL) return NULL;
- c->status = dcerpc_init_syntaxes(uuid, version,
+ c->status = dcerpc_init_syntaxes(table,
&syntax, &transfer_syntax);
if (!NT_STATUS_IS_OK(c->status)) {
DEBUG(2,("Invalid uuid string in "
@@ -63,10 +62,10 @@ NTSTATUS dcerpc_bind_auth_none_recv(struct composite_context *ctx)
}
NTSTATUS dcerpc_bind_auth_none(struct dcerpc_pipe *p,
- const char *uuid, uint_t version)
+ const struct dcerpc_interface_table *table)
{
struct composite_context *ctx;
- ctx = dcerpc_bind_auth_none_send(p, p, uuid, version);
+ ctx = dcerpc_bind_auth_none_send(p, p, table);
return dcerpc_bind_auth_none_recv(ctx);
}
@@ -166,7 +165,7 @@ static void bind_auth_recv_bindreply(struct composite_context *creq)
struct composite_context *dcerpc_bind_auth_send(TALLOC_CTX *mem_ctx,
struct dcerpc_pipe *p,
- const char *uuid, uint_t version,
+ const struct dcerpc_interface_table *table,
struct cli_credentials *credentials,
uint8_t auth_type,
const char *service)
@@ -192,7 +191,7 @@ struct composite_context *dcerpc_bind_auth_send(TALLOC_CTX *mem_ctx,
state->pipe = p;
- c->status = dcerpc_init_syntaxes(uuid, version,
+ c->status = dcerpc_init_syntaxes(table,
&syntax,
&transfer_syntax);
if (!NT_STATUS_IS_OK(c->status)) goto failed;
@@ -321,13 +320,13 @@ NTSTATUS dcerpc_bind_auth_recv(struct composite_context *creq)
setup GENSEC on a DCE-RPC pipe
*/
NTSTATUS dcerpc_bind_auth(struct dcerpc_pipe *p,
- const char *uuid, uint_t version,
+ const struct dcerpc_interface_table *table,
struct cli_credentials *credentials,
uint8_t auth_type,
const char *service)
{
struct composite_context *creq;
- creq = dcerpc_bind_auth_send(p, p, uuid, version, credentials,
+ creq = dcerpc_bind_auth_send(p, p, table, credentials,
auth_type, service);
return dcerpc_bind_auth_recv(creq);
}