diff options
author | Stefan Metzmacher <metze@samba.org> | 2013-09-17 07:16:29 +0200 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2013-10-17 08:48:54 +1300 |
commit | 07ec60ce72bbf3ff0ac2ddb94de24fb47a48cc1e (patch) | |
tree | b0beab54c9f0bdf4602867bb880edde6065d9a0e | |
parent | ecb31505878be358d1101a42106eda35bb48b4c7 (diff) | |
download | samba-07ec60ce72bbf3ff0ac2ddb94de24fb47a48cc1e.tar.gz samba-07ec60ce72bbf3ff0ac2ddb94de24fb47a48cc1e.tar.bz2 samba-07ec60ce72bbf3ff0ac2ddb94de24fb47a48cc1e.zip |
s4:librpc/rpc: add dcerpc_secondary_smb_send/recv()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
-rw-r--r-- | source4/librpc/rpc/dcerpc.h | 4 | ||||
-rw-r--r-- | source4/librpc/rpc/dcerpc_smb.c | 19 |
2 files changed, 23 insertions, 0 deletions
diff --git a/source4/librpc/rpc/dcerpc.h b/source4/librpc/rpc/dcerpc.h index c1e6445ba3..0a319d31ff 100644 --- a/source4/librpc/rpc/dcerpc.h +++ b/source4/librpc/rpc/dcerpc.h @@ -211,6 +211,10 @@ NTSTATUS dcerpc_bind_auth_schannel(TALLOC_CTX *tmp_ctx, struct tevent_context *dcerpc_event_context(struct dcerpc_pipe *p); NTSTATUS dcerpc_init(void); struct smbcli_tree *dcerpc_smb_tree(struct dcecli_connection *c); +struct composite_context *dcerpc_secondary_smb_send(struct dcecli_connection *c1, + struct dcerpc_pipe *p2, + const char *pipe_name); +NTSTATUS dcerpc_secondary_smb_recv(struct composite_context *c); NTSTATUS dcerpc_secondary_context(struct dcerpc_pipe *p, struct dcerpc_pipe **pp2, const struct ndr_interface_table *table); diff --git a/source4/librpc/rpc/dcerpc_smb.c b/source4/librpc/rpc/dcerpc_smb.c index 71faeb4b3f..c84896f4dc 100644 --- a/source4/librpc/rpc/dcerpc_smb.c +++ b/source4/librpc/rpc/dcerpc_smb.c @@ -597,3 +597,22 @@ _PUBLIC_ struct smbcli_tree *dcerpc_smb_tree(struct dcecli_connection *c) return smb->tree; } + +struct composite_context *dcerpc_secondary_smb_send(struct dcecli_connection *c1, + struct dcerpc_pipe *p2, + const char *pipe_name) +{ + struct smb_private *smb; + + if (c1->transport.transport != NCACN_NP) return NULL; + + smb = talloc_get_type(c1->transport.private_data, struct smb_private); + if (!smb) return NULL; + + return dcerpc_pipe_open_smb_send(p2, smb->tree, pipe_name); +} + +NTSTATUS dcerpc_secondary_smb_recv(struct composite_context *c) +{ + return dcerpc_pipe_open_smb_recv(c); +} |