summaryrefslogtreecommitdiff
path: root/source3/rpc_client/cli_pipe.c
AgeCommit message (Collapse)AuthorFilesLines
2010-07-13s3-dcerpc: fix dcerpc_push_ncacn_packet, pass arg by addressSimo Sorce1-5/+5
There is no need to copy the whole structure twice by passing it in by value. Signed-off-by: Günther Deschner <gd@samba.org>
2010-07-13sr-dcerpc: add dcerpc_push_ncacn_packet_header()Simo Sorce1-0/+36
Signed-off-by: Günther Deschner <gd@samba.org>
2010-07-13s3-dcerpc: Use dcerpc_set_frag_length()Simo Sorce1-13/+9
Automatically calculate the fragment length where possible. Signed-off-by: Günther Deschner <gd@samba.org>
2010-07-13s3-dcerpc: Fix ntlmssp sign/seal.Simo Sorce1-15/+29
Header calculation was misplaced. Signed-off-by: Günther Deschner <gd@samba.org>
2010-07-13s3-dceprc: Fix auth_length in auth3 responseSimo Sorce1-3/+2
Signed-off-by: Günther Deschner <gd@samba.org>
2010-07-12s3-dcerpc: Fix miscalculation of buffer start addressSimo Sorce1-1/+3
This was breaking schannel
2010-07-08s3-dcerpc: make dcerpc_pull_dcerpc_auth() publicSimo Sorce1-3/+3
2010-07-08s3-dcerpc: make dceprc_push_dcerpc_auth publicSimo Sorce1-7/+8
2010-07-08s3-dcerpc: use dcerpc_pull_dcerpc_auth() in ↵Simo Sorce1-13/+12
rpc_finish_spnego_ntlmssp_bind_send()
2010-07-08s3-dcerpc: use dcerpc_push_dcerpc_auth in add_schannel_auth_footer()Simo Sorce1-17/+16
2010-07-08s3-dcerpc: use dcerpc_push_dcerpc_auth() in add_ntlmssp_auth_footer()Simo Sorce1-54/+48
2010-07-08s3-dcerpc: use dcerpc_pull_dcerpc_auth() in cli_pipe_verify_schannel()Simo Sorce1-7/+13
2010-07-08s3-dcerpc: use dcerpc_push_ncacn_packet() in create_rpc_bind_auth3()Simo Sorce1-35/+30
2010-07-08Change one more use of "struct rpc_hdr_info" -> "struct ncacn_packet_header"Jeremy Allison1-9/+7
Jeremy
2010-07-08s3-dcerpc: use dcerpc_pull_ncacn_packet() for rpc_pipe_bind_step_one_done().Günther Deschner1-39/+42
Guenther Signed-off-by: Simo Sorce <idra@samba.org>
2010-07-08s3-dcerpc: use dcerpc_push_ncacn_packet() in push_next_frag().Günther Deschner1-17/+20
Guenther Signed-off-by: Simo Sorce <idra@samba.org>
2010-07-08s3-dcerpc: use dcerpc_pull_ncacn_packet() in cli_pipe_validate_current_pdu().Günther Deschner1-6/+14
Guenther Signed-off-by: Simo Sorce <idra@samba.org>
2010-07-08s3-dcerpc: use dcerpc_pull_dcerpc_auth() in cli_pipe_verify_ntlmssp().Günther Deschner1-9/+13
Guenther Signed-off-by: Simo Sorce <idra@samba.org>
2010-07-08s3-dcerpc: add dcerpc_pull_dcerpc_auth().Günther Deschner1-0/+22
Guenther Signed-off-by: Simo Sorce <idra@samba.org>
2010-07-08s3-dcerpc: use struct ncacn_packet_header instead of struct rpc_hdr_info.Günther Deschner1-58/+77
Guenther Signed-off-by: Simo Sorce <idra@samba.org>
2010-07-08s3-dcerpc: add dcerpc_pull_ncacn_packet_header().Günther Deschner1-0/+22
Guenther Signed-off-by: Simo Sorce <idra@samba.org>
2010-07-07s3-dcerpc: use dcerpc_push_dcerpc_auth() for all authenticated binds.Günther Deschner1-148/+104
Guenther Signed-off-by: Simo Sorce <idra@samba.org>
2010-07-07s3-dcerpc: add dcerpc_push_schannel_bind().Günther Deschner1-0/+22
Guenther Signed-off-by: Simo Sorce <idra@samba.org>
2010-07-07s3-dcerpc: add dcerpc_push_dcerpc_auth().Günther Deschner1-0/+34
Guenther Signed-off-by: Simo Sorce <idra@samba.org>
2010-07-07s3-dcerpc: use dcerpc_push_ncacn_packet() for create_bind_or_alt_ctx_internal().Günther Deschner1-20/+58
Guenther Signed-off-by: Simo Sorce <idra@samba.org>
2010-07-07s3-dcerpc: use dcerpc_pull_ncacn_packet() for pulling a RPC fault pdu.Günther Deschner1-13/+11
Guenther Signed-off-by: Simo Sorce <idra@samba.org>
2010-07-07s3-dcerpc: add dcerpc_pull_ncacn_packet().Günther Deschner1-0/+22
Guenther Signed-off-by: Simo Sorce <idra@samba.org>
2010-07-07s3-dcerpc: add dcerpc_push_ncacn_packet().Günther Deschner1-0/+41
Guenther Signed-off-by: Simo Sorce <idra@samba.org>
2010-06-21s3: Remove an unreachable line of codeVolker Lendecke1-2/+0
2010-06-18Second part of fix converting prs_XX struct and functions to talloc. Remove ↵Jeremy Allison1-47/+0
unneeded prs_mem_free calls. Jeremy. Signed-off-by: Simo Sorce <idra@samba.org>
2010-06-18Convert the prs_XXX struct and functions to use talloc instead of malloc. ↵Jeremy Allison1-14/+10
Passes valgrind and make tests for client and server. Second version of this patch after splitting up at Simo's request. Patch to follow will delete extraneous prs_mem_free() calls. Jeremy. Signed-off-by: Simo Sorce <idra@samba.org>
2010-05-31s3:ntlmssp Use a TALLOC_CTX for ntlmssp_sign_packet() and ntlmssp_seal_packet()Andrew Bartlett1-5/+10
This ensures the results can't be easily left to leak. Andrew Bartlett Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-31ntlmssp: Make the ntlmssp.h from source3/ a common headerAndrew Bartlett1-1/+1
The code is not yet in common, but I hope to fix that soon. Andrew Bartlett Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-18s3-rpc_client: move protos to cli_netlogon.hGünther Deschner1-0/+1
Guenther
2010-05-18s3: Remove use of iconv_convenience.Jelmer Vernooij1-1/+1
2010-05-06s3: only include gen_ndr headers where needed.Günther Deschner1-0/+16
This shrinks include/includes.h.gch by the size of 7 MB and reduces build time as follows: ccache build w/o patch real 4m21.529s ccache build with patch real 3m6.402s pch build w/o patch real 4m26.318s pch build with patch real 3m6.932s Guenther
2010-03-29s3:rpc_client: return at least 10 sec as old timeout in rpccli_set_timeout() ↵Stefan Metzmacher1-3/+12
instead of 0 metze
2010-03-29s3:rpc_client: add set_timeout hook to rpc_cli_transportStefan Metzmacher1-20/+5
metze
2010-03-29s3:rpc_client: add rpccli_is_connected()Stefan Metzmacher1-0/+13
metze
2010-03-29s3:rpc_client: don't mix layers and keep a reference to cli_state in the callerStefan Metzmacher1-8/+17
We should not rely on the backend to have a reference to the cli_state. This will make it possible for the backend to set its cli_state reference to NULL, when the transport is dead. metze
2010-03-24s3:ntlmssp: pass names and use_ntlmv2 to ntlmssp_client_start() and store themStefan Metzmacher1-1/+5
Inspired by the NTLMSSP merge work by Andrew Bartlett. metze Signed-off-by: Günther Deschner <gd@samba.org>
2010-02-17Fix bug #7146 - Samba miss-parses authenticated RPC packets.Jeremy Allison1-15/+47
Parts of the Samba RPC client and server code misinterpret authenticated packets. DCE authenticated packets actually look like this : +--------------------------+ |header | | ... frag_len (packet len)| | ... auth_len | +--------------------------+ | | | Data payload | ... .... | | +--------------------------+ | | | auth_pad_len bytes | +--------------------------+ | | | Auth footer | | auth_pad_len value | +--------------------------+ | | | Auth payload | | (auth_len bytes long) | +--------------------------+ That's right. The pad bytes come *before* the footer specifying how many pad bytes there are. In order to read this you must seek to the end of the packet and subtract the auth_len (in the packet header) and the auth footer length (a known value). The client and server code gets this right (mostly) in 3.0.x -> 3.4.x so long as the pad alignment is on an 8 byte boundary (there are some special cases in the code for this). Tridge discovered there are some (DRS replication) cases where on 64-bit machines where the pad alignment is on a 16-byte boundary. This breaks the existing S3 hand-optimized rpc code. This patch removes all the special cases in client and server code, and allows the pad alignment for generated packets to be specified by changing a constant in include/local.h (this doesn't affect received packets, the new code always handles them correctly whatever pad alignment is used). This patch also works correctly with rpcclient using sign+seal from the 3.4.x and 3.3.x builds (testing with 3.0.x and 3.2.x to follow) so even as a server it should still work with older libsmbclient and winbindd code. Jeremy
2010-01-06s3: Fix infinite loop in NCACN_IP_TCP asa there is no timeout. Assume ↵Bo Yang1-4/+22
lsa_pipe_tcp is ok but network is down, then send request is ok, but select() on writeable fds loops forever since there is no response. Signed-off-by: Bo Yang <boyang@samba.org>
2009-12-22s3:ntlmssp: only include ntlmssp.h where actually neededAndrew Bartlett1-0/+1
Andrew Bartlett
2009-12-22s3:ntlmssp: remove the typedef NTLMSSP_STATEAndrew Bartlett1-1/+1
Andrew Bartlett
2009-11-27s3-kerberos: only use krb5 headers where required.Günther Deschner1-0/+1
This seems to be the only way to deal with mixed heimdal/MIT setups during merged build. Guenther
2009-11-26s3-rpc: running minimal_includes.pl on rpc_client and rpc_server.Günther Deschner1-2/+0
Guenther
2009-11-12Remove erroneous 'presult = NULL' changes. Now presult only gets setJeremy Allison1-9/+2
if NTSTATUS == OK. Jeremy.
2009-11-12Revert "Ensure every return path initializes presult as NULL."Jeremy Allison1-40/+0
Vl is correct, this is the wrong way to fix this. This reverts commit 83c2c177a5e86d04da37384f1f04230c8274e1e6.
2009-11-12Ensure all callers to the rpc_client/cli_pipe functions correctlyJeremy Allison1-2/+2
initialize return variables. Jeremy.