summaryrefslogtreecommitdiff
path: root/source4/librpc/rpc/dcerpc_auth.c
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2005-11-19 22:31:26 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:46:30 -0500
commit46685f3e205d4a9d284ebfd070633d128fae05a1 (patch)
tree7f9eebf0bde939d9c0e76b7e7c5ec2ab560f8c34 /source4/librpc/rpc/dcerpc_auth.c
parentc217570f64b25bab22bd769b30b709a1e729724d (diff)
downloadsamba-46685f3e205d4a9d284ebfd070633d128fae05a1.tar.gz
samba-46685f3e205d4a9d284ebfd070633d128fae05a1.tar.bz2
samba-46685f3e205d4a9d284ebfd070633d128fae05a1.zip
r11804: Asyncify the anonymous bind, convert the calls in xplogin.c.
Tridge et al, please take a close look at this. It survives my basic rpc-login test as well as rpc-lsa, but this is critical I think. Volker (This used to be commit bf1a55f44c84d9bb8b2f83f5d25727550ca8fcf2)
Diffstat (limited to 'source4/librpc/rpc/dcerpc_auth.c')
-rw-r--r--source4/librpc/rpc/dcerpc_auth.c48
1 files changed, 41 insertions, 7 deletions
diff --git a/source4/librpc/rpc/dcerpc_auth.c b/source4/librpc/rpc/dcerpc_auth.c
index 8ad3be4ecd..4c22b61519 100644
--- a/source4/librpc/rpc/dcerpc_auth.c
+++ b/source4/librpc/rpc/dcerpc_auth.c
@@ -23,20 +23,54 @@
*/
#include "includes.h"
+#include "libcli/composite/composite.h"
/*
do a non-athenticated dcerpc bind
*/
-NTSTATUS dcerpc_bind_auth_none(struct dcerpc_pipe *p,
- const char *uuid, uint_t version)
+
+struct composite_context *dcerpc_bind_auth_none_send(TALLOC_CTX *mem_ctx,
+ struct dcerpc_pipe *p,
+ const char *uuid,
+ uint_t version)
{
- TALLOC_CTX *tmp_ctx = talloc_new(p);
- NTSTATUS status;
+ struct dcerpc_syntax_id syntax;
+ struct dcerpc_syntax_id transfer_syntax;
- status = dcerpc_bind_byuuid(p, tmp_ctx, uuid, version);
- talloc_free(tmp_ctx);
+ struct composite_context *c;
- return status;
+ c = talloc_zero(mem_ctx, struct composite_context);
+ if (c == NULL) return NULL;
+
+ c->status = dcerpc_init_syntaxes(uuid, &syntax, &transfer_syntax,
+ version);
+ if (!NT_STATUS_IS_OK(c->status)) {
+ DEBUG(2,("Invalid uuid string in "
+ "dcerpc_bind_auth_none_send\n"));
+ goto failed;
+ }
+
+ /* c was only allocated as a container for a possible error */
+ talloc_free(c);
+
+ return dcerpc_bind_send(p, mem_ctx, &syntax, &transfer_syntax);
+
+ failed:
+ composite_trigger_error(c);
+ return c;
+}
+
+NTSTATUS dcerpc_bind_auth_none_recv(struct composite_context *ctx)
+{
+ return dcerpc_bind_recv(ctx);
+}
+
+NTSTATUS dcerpc_bind_auth_none(struct dcerpc_pipe *p,
+ const char *uuid, uint_t version)
+{
+ struct composite_context *ctx;
+ ctx = dcerpc_bind_auth_none_send(p, p, uuid, version);
+ return dcerpc_bind_auth_none_recv(ctx);
}
/*